From 4aa3360495ab19df3d2a5405519e00bbc94f882d Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 13 Feb 2014 15:48:20 +0100 Subject: [PATCH] resize the panel in one single go --- src/shell/panelview.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/shell/panelview.cpp b/src/shell/panelview.cpp index fb4f56048..6b90be2b7 100644 --- a/src/shell/panelview.cpp +++ b/src/shell/panelview.cpp @@ -374,20 +374,13 @@ void PanelView::positionPanel() m_strutsTimer->stop(); m_strutsTimer->start(STRUTSTIMERDELAY); - if (thickness() != oldThickness) { - if (formFactor() == Plasma::Types::Vertical) { - setWidth(thickness()); - } else { - setHeight(thickness()); - } + if (formFactor() == Plasma::Types::Vertical) { + resize(thickness(), length()); + emit thicknessChanged(); + emit length(); + } else { + resize(length(), thickness()); emit thicknessChanged(); - } - if (length() != oldLength) { - if (formFactor() == Plasma::Types::Vertical) { - setHeight(length()); - } else { - setWidth(length()); - } emit length(); } }