diff --git a/sources/desktop-panel/desktop-panel.cpp b/sources/desktop-panel/desktop-panel.cpp index 2ac8ace..2e79935 100644 --- a/sources/desktop-panel/desktop-panel.cpp +++ b/sources/desktop-panel/desktop-panel.cpp @@ -278,6 +278,22 @@ void DesktopPanel::updateText(const bool first) labels[i]->setText(text); } update(); + int height = 0; + int width = 0; + for (int i=0; iadjustSize(); + proxyWidgets[i]->setGeometry(labels[i]->geometry()); + if (configuration[QString("layout")].toInt() == 0) { + width += proxyWidgets[i]->geometry().width(); + if (height < proxyWidgets[i]->geometry().height()) + height = proxyWidgets[i]->geometry().height(); + } else { + height += proxyWidgets[i]->geometry().height(); + if (width < proxyWidgets[i]->geometry().width()) + width = proxyWidgets[i]->geometry().width(); + } + } + layout->setMinimumSize(width, height); }