hi,

there seems to be a bug in the system tray with a vertical panel. instead 
grouping the items side by side, they are stacked, so that much space is 
wasted.
the problem seems to be also in a horizontal panel. there are only two rows 
even if there is space for much more rows.

the following patch solves the problem. ok to commit?

mathias
Index: compactlayout.cpp
===================================================================
--- compactlayout.cpp	(Revision 902696)
+++ compactlayout.cpp	(Arbeitskopie)
@@ -277,10 +277,10 @@
                 direction = Qt::Vertical;
             } else if (int(constraint.width()) == 0 && constraint.height() > 0) {
                 direction = Qt::Horizontal;
-            // Extend based on constraints
-            } else if (yDelta > 0 && xDelta < 0) {
+            // Extend based on constraints and prevent expanding if possible
+            } else if ((sizePolicy.verticalPolicy() != QSizePolicy::Expanding) && xDelta < 0) {
                 direction = Qt::Horizontal;
-            } else if (xDelta >= 0 && yDelta < 0) {
+            } else if ((sizePolicy.horizontalPolicy() != QSizePolicy::Expanding) && yDelta < 0) {
                 direction = Qt::Vertical;
             // Then extend based on expanding policy
             } else if (sizePolicy.horizontalPolicy() != QSizePolicy::Expanding) {
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to