[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-17 0:28:21
Message-ID: 1268785701.777429.10374.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1104216 by bettio:
Avoid to call resize() and to emit any size changed related signal if the size is not changed.
M +16 -6 frame.cpp
--- trunk/KDE/kdeplasma-addons/applets/frame/frame.cpp #1104215:1104216
@@ -162,8 +162,11 @@
m_frameOutline = 8;
m_swOutline = 8;
//Restore widget geometry to image proportions
- resize(contentSizeHint());
- emit appletTransformedItself();
+ QSizeF sizeHint = contentSizeHint();
+ if (sizeHint != geometry().size()){
+ resize(sizeHint);
+ emit appletTransformedItself();
+ }
}
m_updateTimer->start(400);
}
@@ -249,9 +252,13 @@
setAssociatedApplicationUrls(m_mySlideShow->currentUrl());
}
- emit sizeHintChanged(Qt::PreferredSize);
- resize(contentSizeHint());
+ if (sizeHint != geometry().size()){
+ emit sizeHintChanged(Qt::PreferredSize);
+ resize(sizeHint);
+ }
+
+
kDebug() << "Rendering picture";
// create a QPixmap which can be drawn in paintInterface()
@@ -697,8 +704,11 @@
void Frame::delayedUpdateSize()
{
- resize(contentSizeHint());
- emit appletTransformedItself();
+ QSizeF sizeHint = contentSizeHint();
+ if (sizeHint != geometry().size()){
+ resize(sizeHint);
+ emit appletTransformedItself();
+ }
}
#include "frame.moc"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic