KDE/kdebase/workspace/plasma/applets/systemtray

Sebastian Kügler sebas at kde.org
Tue Jul 1 04:51:10 CEST 2008


SVN commit 826594 by sebas:

Only set width or height minima, so the systray expands only in
the expandable direction. minimum width and height are 22 in
those cases. This patch makes it possible to shrink the systray
 -- and with it the whole panel -- again, once it has had more
rows. This wasn't possible after r826397.

This makes the whole panel not shrink below 22. If we make that
possible (by not setting the min height to 22), the systray just
vanishes when the panel gets smaller. Not sure which situation I
prefer, ideas?

CCMAIL:panel-devel at kde.org


 M  +8 -1      systemtray.cpp  


--- trunk/KDE/kdebase/workspace/plasma/applets/systemtray/systemtray.cpp #826593:826594
@@ -137,7 +137,14 @@
                                               m_systemTrayWidget->minimumSize()));
     rf.setWidth(rf.width() + leftMargin + rightMargin);
     rf.setHeight(rf.height() + topMargin + bottomMargin);
-    setMinimumSize(rf.size());
+
+    if (formFactor() == Plasma::Vertical) {
+        setMinimumHeight(rf.height());
+        setMinimumWidth(22);
+    } else if (formFactor() == Plasma::Horizontal) {
+        setMinimumWidth(rf.width());
+        setMinimumHeight(22);
+    }
     setPreferredSize(rf.size());
 
     // Calculate the rect usable by the system tray widget


More information about the Panel-devel mailing list