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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/applets/kickoff/ui
From:       Sebastian Sauer <mail () dipe ! org>
Date:       2008-03-01 1:10:49
Message-ID: 1204333849.681817.27229.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 780796 by sebsauer:

even better

 M  +5 -5      tabbar.cpp  


--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/tabbar.cpp #780795:780796
@@ -85,13 +85,13 @@
     QSize hint = tabSize(index);
 
     if (count() > 0) {
-        int w = width() / count();
+        int minwidth = 0;
         for (int i = count() - 1; i >= 0; i--) {
-            if (tabSize(i).rwidth() >= w) {
-                return hint;
-            }
+            minwidth += tabSize(i).rwidth();
         }
-        hint.rwidth() = w;
+        if (minwidth < width()) {
+            hint.rwidth() += (width() - minwidth) / count();
+        }
     }
 
     return hint;
[prev in list] [next in list] [prev in thread] [next in thread] 

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