[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/suse_kickoff_qstyle/kicker/kicker/buttons
From:       Dirk Mueller <mueller () kde ! org>
Date:       2007-04-23 11:10:30
Message-ID: 1177326630.115673.18059.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 657153 by mueller:

add a workaround for the icon not being re-scaled
properly (bnc: 222546)


 M  +12 -0     knewbutton.cpp  


--- branches/work/suse_kickoff_qstyle/kicker/kicker/buttons/knewbutton.cpp #657152:657153
@@ -182,6 +182,13 @@
 int KNewButton::widthForHeight(int height) const
 {
     int r = m_iconSize.width() * buttonScaleFactor(QSize(m_iconSize.width(), height));
+
+    if (!m_movie->running() && height != m_active_pixmap.height())
+    {
+        KNewButton* that = const_cast<KNewButton*>(this);
+        QTimer::singleShot(0, that, SLOT(slotStopAnimation()));
+    }
+ 
     return r;
 }
 
@@ -193,6 +200,11 @@
 int KNewButton::heightForWidth(int width) const
 {
     int r = m_iconSize.width() * buttonScaleFactor(QSize(width, m_iconSize.height()));
+    if (!m_movie->running() && width != m_active_pixmap.width())
+    {
+        KNewButton* that = const_cast<KNewButton*>(this);
+        QTimer::singleShot(0, that, SLOT(slotStopAnimation()));
+    }
     return r;
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic