From fc2d338450df40000858c223f36d191596df92d2 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Fri, 1 Aug 2014 20:49:10 +0400 Subject: [PATCH] fix resize event --- sources/plasmoid/netctl.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sources/plasmoid/netctl.cpp b/sources/plasmoid/netctl.cpp index f17b4ea..c7d4624 100644 --- a/sources/plasmoid/netctl.cpp +++ b/sources/plasmoid/netctl.cpp @@ -227,8 +227,12 @@ void Netctl::updateInterface(bool setShown) if (debug) qDebug() << "[PLASMOID]" << "[updateInterface]" << ":" << "State" << setShown; textLabel.setHidden(!setShown); - layout->setSizeConstraint(QLayout::SetMinimumSize); - graphicsWidget->resize(1, 1); + if (setShown) + layout->addWidget(&textLabel); + else + layout->removeWidget(&textLabel); + graphicsWidget->adjustSize(); + resize(1, 1); }