Commit ac5d2abf authored by Björn Ruberg's avatar Björn Ruberg
Browse files

Properly restore the size of PopupApplets from last session even when a...

Properly restore the size of PopupApplets from last session even when a preferredSize is set in the graphicsWidget()
BUG: 236853
BUG: 233235

 Please enter the commit message for your changes. Lines starting
parent 932a93ba
......@@ -400,7 +400,7 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints)
}
dialog->setGraphicsWidget(gWidget);
gWidget->resize(gWidget->preferredSize());
//gWidget->resize(gWidget->preferredSize());
dialog->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | (gWidget->windowFlags() & Qt::X11BypassWindowManagerHint));
} else if (qWidget) {
QVBoxLayout *l_layout = new QVBoxLayout(dialog);
......@@ -837,9 +837,10 @@ void PopupAppletPrivate::restoreDialogSize()
int preferredWidth = 0;
int preferredHeight = 0;
if (dialog->graphicsWidget()) {
preferredWidth = dialog->graphicsWidget()->preferredSize().width();
preferredHeight = dialog->graphicsWidget()->preferredSize().height();
QGraphicsWidget *gWidget = dialog->graphicsWidget();
if (gWidget) {
preferredWidth = gWidget->preferredSize().width();
preferredHeight = gWidget->preferredSize().height();
}
const int width = qMin(sizeGroup.readEntry("DialogWidth", preferredWidth),
......@@ -857,6 +858,9 @@ void PopupAppletPrivate::restoreDialogSize()
if (saved.width() != dialog->width() || saved.height() != dialog->height()) {
dialog->resize(saved);
/*if (gWidget) {
gWidget->resize(saved);
}*/
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment