[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeplasma-addons/applets/frame
From: Davide Bettio <davide.bettio () kdemail ! net>
Date: 2010-03-16 22:15:39
Message-ID: 1268777739.278008.3892.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1104166 by bettio:
Smoother scaling.
M +6 -2 frame.cpp
M +2 -0 frame.h
--- trunk/KDE/kdeplasma-addons/applets/frame/frame.cpp #1104165:1104166
@@ -113,6 +113,10 @@
// Initialize the slideshow timer
connect(m_mySlideShow, SIGNAL(pictureUpdated()), this, SLOT(scalePictureAndUpdate()));
+ connect(&m_waitForResize, SIGNAL(timeout()), this, SLOT(scalePictureAndUpdate()));
+ m_waitForResize.setSingleShot(true);
+ m_waitForResize.setInterval(200);
+
initSlideShow();
if (frameReceivedUrlArgs) {
cg.writeEntry("url", m_currentUrl);
@@ -192,7 +196,7 @@
m_slideFrame->setPos(x, y);
}
- scalePictureAndUpdate();
+ m_waitForResize.start();
m_updateTimer->start(400);
}
}
@@ -683,7 +687,7 @@
m_mySlideShow->setUpdateInterval(0);
}
- p->drawPixmap(rect, m_pixmap, rect);
+ p->drawPixmap(rect, m_pixmap);
if (m_slideShow) {
// unsuspend the slideshow to allow time for loading the image
--- trunk/KDE/kdeplasma-addons/applets/frame/frame.h #1104165:1104166
@@ -28,6 +28,7 @@
#include <QPainter>
#include <QGraphicsItem>
#include <QColor>
+#include <QTimer>
#include <plasma/applet.h>
#include <plasma/animator.h>
@@ -121,6 +122,7 @@
Plasma::ToolButton* m_backButton;
Plasma::ToolButton* m_nextButton;
Plasma::Frame* m_slideFrame;
+ QTimer m_waitForResize;
};
K_EXPORT_PLASMA_APPLET(frame, Frame)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic