public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in kde-base/plasma-workspace/files: 4.2-fix-quicklaunch.patch
@ 2009-03-15 18:26 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; only message in thread
From: Tomas Chvatal (scarabeus) @ 2009-03-15 18:26 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/03/15 18:26:17

  Added:                4.2-fix-quicklaunch.patch
  Log:
  Add missing patch.
  (Portage version: 2.2_rc25/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  kde-base/plasma-workspace/files/4.2-fix-quicklaunch.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/kde-base/plasma-workspace/files/4.2-fix-quicklaunch.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/kde-base/plasma-workspace/files/4.2-fix-quicklaunch.patch?rev=1.1&content-type=text/plain

Index: 4.2-fix-quicklaunch.patch
===================================================================
--- kdebase-workspace-4.2.1-orig/plasma/applets/quicklaunch/quicklaunchApplet.cpp	2009-02-26 15:17:02.000000000 +0100
+++ kdebase-workspace-4.2.1/plasma/applets/quicklaunch/quicklaunchApplet.cpp	2009-03-08 13:53:49.000000000 +0100
@@ -44,6 +44,8 @@
 
 QuicklaunchApplet::QuicklaunchApplet(QObject *parent, const QVariantList &args)
   : Plasma::Applet(parent, args),
+    m_layout(0),
+    m_innerLayout(0),
     m_visibleIcons(6),
     m_rowCount(2),
     m_dialogRowCount(2),
@@ -53,9 +55,7 @@
     m_addDialog(0),
     m_rightClickedIcon(0),
     m_addAction(0),
-    m_removeAction(0),
-    m_layout(0),
-    m_innerLayout(0)
+    m_removeAction(0)
 {
     setHasConfigurationInterface(true);
     setAcceptDrops(true);
@@ -141,16 +141,11 @@
         if (!m_innerLayout) {
             return sizeHint;
         }
+        qreal newWidth = m_innerLayout->columnCount() * sizeHint.height() / qMax(1, m_innerLayout->rowCount());
         if (m_icons.size() > m_visibleIcons) {
-            qreal factor = m_innerLayout->rowCount() * m_innerLayout->columnCount() + size().height();
-            if (factor) {
-                sizeHint.setWidth(sizeHint.height() / factor);
-            }
+            sizeHint.setWidth(newWidth + sizeHint.height());
         } else {
-            qreal factor = m_innerLayout->rowCount() * m_innerLayout->columnCount();
-            if (factor) {
-                sizeHint.setWidth(sizeHint.height() / factor);
-            }
+            sizeHint.setWidth(newWidth);
         }
         return sizeHint;
     }






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-15 18:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-15 18:26 [gentoo-commits] gentoo-x86 commit in kde-base/plasma-workspace/files: 4.2-fix-quicklaunch.patch Tomas Chvatal (scarabeus)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox