better syncing between dialog graphicswidget and the dialog
(popups shows up at a sane size now) svn path=/trunk/KDE/kdelibs/; revision=935167
This commit is contained in:
parent
5a2a47f473
commit
a409afab79
@ -442,10 +442,7 @@ void Dialog::showEvent(QShowEvent * event)
|
||||
|
||||
//check if the widget size is still synced with the view
|
||||
if (d->widget && d->view && d->widget->size().toSize() != d->view->size()) {
|
||||
d->widget->resize(d->view->size());
|
||||
|
||||
d->view->setSceneRect(d->widget->mapToScene(d->widget->boundingRect()).boundingRect());
|
||||
d->view->centerOn(d->widget);
|
||||
d->adjustView();
|
||||
}
|
||||
|
||||
if (d->view) {
|
||||
|
@ -251,9 +251,6 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints)
|
||||
q->resize(prefSize);
|
||||
emit q->appletTransformedItself();
|
||||
}
|
||||
|
||||
//FIXME: this will be automatically propagated by the qgraphicslayout in the future
|
||||
lay->setPreferredSize(prefSize);
|
||||
//Applet on popup
|
||||
} else {
|
||||
kDebug() << "about to switch to a popup";
|
||||
@ -296,6 +293,7 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints)
|
||||
if (corona) {
|
||||
corona->addOffscreenWidget(gWidget);
|
||||
dialog->setGraphicsWidget(gWidget);
|
||||
gWidget->resize(gWidget->preferredSize());
|
||||
}
|
||||
} else if (qWidget) {
|
||||
QVBoxLayout *l_layout = new QVBoxLayout(dialog);
|
||||
|
Loading…
Reference in New Issue
Block a user