Hi, all

These days I've been working on BUG 184905.
I found that the size of panel changes when it receives a thememChanged
signal from Plasma::Theme::defaultTheme(). And this signal is sended
when we change the plasma theme or enable/disable window effects.

The reason is that the margins of panel's layout isn't equal to the
margins of panel's background.
(kdebase/workspace/plasma/containments/panel/panel.cpp line 678-684)

And I found that it is not necessary to adjust margins for toolBoxItem,
(kdebase/workspace/plasma/containments/panel/panel.cpp line 553-568)

because the geometry of toolBoxItem is controlled by Plasma::Containment.

I'm not sure whether my understanding is correct. ):

Regards
-- 
潘卫平(Peter Pan)
Red Flag Software Co., Ltd
Index: panel.cpp
===================================================================
--- panel.cpp	(版本 1006104)
+++ panel.cpp	(工作副本)
@@ -550,23 +550,6 @@
 
     //invalidate the layout and set again
     if (layout()) {
-        switch (location()) {
-        case LeftEdge:
-            rightWidth = qMin(rightWidth, qMax(qreal(1), size().width() - KIconLoader::SizeMedium));
-            break;
-        case RightEdge:
-            leftWidth = qMin(leftWidth, qMax(qreal(1), size().width() - KIconLoader::SizeMedium));
-            break;
-        case TopEdge:
-            bottomHeight = qMin(bottomHeight, qMax(qreal(1), size().height() - KIconLoader::SizeMedium));
-            break;
-        case BottomEdge:
-            topHeight = qMin(topHeight, qMax(qreal(1), size().height() - KIconLoader::SizeMedium));
-            break;
-        default:
-            break;
-        }
-
         qreal oldLeft = leftWidth;
         qreal oldTop = topHeight;
         qreal oldRight = rightWidth;
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to