correctly resize the graphicswidget when the dialog corners are dragged
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=869267
This commit is contained in:
parent
57d1f48145
commit
1a196323d2
11
dialog.cpp
11
dialog.cpp
@ -283,7 +283,16 @@ void Dialog::resizeEvent(QResizeEvent *e)
|
||||
setMask(d->background->mask());
|
||||
|
||||
if (d->resizeStartCorner != Dialog::NoCorner && d->view && d->widget) {
|
||||
d->widget->resize(d->view->size());
|
||||
d->widget->setPreferredSize(d->view->size());
|
||||
|
||||
QGraphicsLayoutItem *layout = d->widget->parentLayoutItem();
|
||||
QGraphicsWidget *parentWidget = d->widget->parentWidget();
|
||||
|
||||
if (layout && parentWidget) {
|
||||
layout->updateGeometry();
|
||||
parentWidget->resize(layout->preferredSize());
|
||||
}
|
||||
|
||||
d->view->setSceneRect(d->widget->mapToScene(d->widget->boundingRect()).boundingRect());
|
||||
d->view->centerOn(d->widget);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user