diff --git a/shell/panelview.h b/shell/panelview.h --- a/shell/panelview.h +++ b/shell/panelview.h @@ -216,6 +216,7 @@ VisibilityMode m_visibilityMode; Plasma::Theme m_theme; QTimer m_positionPaneltimer; + QTimer m_resizePanelTimer; QTimer m_unhideTimer; //only for the mask, not to actually paint Plasma::FrameSvg *m_background; diff --git a/shell/panelview.cpp b/shell/panelview.cpp --- a/shell/panelview.cpp +++ b/shell/panelview.cpp @@ -84,6 +84,13 @@ positionPanel(); }); + m_resizePanelTimer.setSingleShot(true); + m_resizePanelTimer.setInterval(150); + connect(&m_resizePanelTimer, &QTimer::timeout, + this, [this] () { + resizePanel(); + }); + m_unhideTimer.setSingleShot(true); m_unhideTimer.setInterval(500); connect(&m_unhideTimer, &QTimer::timeout, @@ -211,7 +218,7 @@ config().writeEntry("thickness", value); m_corona->requestApplicationConfigSync(); - resizePanel(); + m_resizePanelTimer.start(); } int PanelView::length() const @@ -227,7 +234,7 @@ m_contentLength = value; - resizePanel(); + m_resizePanelTimer.start(); emit m_corona->availableScreenRegionChanged(); } @@ -251,7 +258,7 @@ emit maximumLengthChanged(); m_corona->requestApplicationConfigSync(); - resizePanel(); + m_resizePanelTimer.start(); } int PanelView::minimumLength() const @@ -274,7 +281,7 @@ emit minimumLengthChanged(); m_corona->requestApplicationConfigSync(); - resizePanel(); + m_resizePanelTimer.start(); } int PanelView::distance() const @@ -510,7 +517,7 @@ m_minLength = qBound(MINSIZE, config().readEntry("minLength", side), maxSize); setVisibilityMode((VisibilityMode)config().readEntry("panelVisibility", (int)NormalPanel)); - resizePanel(); + m_resizePanelTimer.start(); positionPanel(); emit maximumLengthChanged();