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
|
//check if the widget size is still synced with the view
|
||||||
if (d->widget && d->view && d->widget->size().toSize() != d->view->size()) {
|
if (d->widget && d->view && d->widget->size().toSize() != d->view->size()) {
|
||||||
d->widget->resize(d->view->size());
|
d->adjustView();
|
||||||
|
|
||||||
d->view->setSceneRect(d->widget->mapToScene(d->widget->boundingRect()).boundingRect());
|
|
||||||
d->view->centerOn(d->widget);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d->view) {
|
if (d->view) {
|
||||||
|
@ -251,9 +251,6 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints)
|
|||||||
q->resize(prefSize);
|
q->resize(prefSize);
|
||||||
emit q->appletTransformedItself();
|
emit q->appletTransformedItself();
|
||||||
}
|
}
|
||||||
|
|
||||||
//FIXME: this will be automatically propagated by the qgraphicslayout in the future
|
|
||||||
lay->setPreferredSize(prefSize);
|
|
||||||
//Applet on popup
|
//Applet on popup
|
||||||
} else {
|
} else {
|
||||||
kDebug() << "about to switch to a popup";
|
kDebug() << "about to switch to a popup";
|
||||||
@ -296,6 +293,7 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints)
|
|||||||
if (corona) {
|
if (corona) {
|
||||||
corona->addOffscreenWidget(gWidget);
|
corona->addOffscreenWidget(gWidget);
|
||||||
dialog->setGraphicsWidget(gWidget);
|
dialog->setGraphicsWidget(gWidget);
|
||||||
|
gWidget->resize(gWidget->preferredSize());
|
||||||
}
|
}
|
||||||
} else if (qWidget) {
|
} else if (qWidget) {
|
||||||
QVBoxLayout *l_layout = new QVBoxLayout(dialog);
|
QVBoxLayout *l_layout = new QVBoxLayout(dialog);
|
||||||
|
Loading…
Reference in New Issue
Block a user