move the dialog on resize only it it waasn't the user resizing it manually
svn path=/trunk/KDE/kdelibs/; revision=1112886
This commit is contained in:
parent
3818bc13e6
commit
ea1e8d4b93
20
dialog.cpp
20
dialog.cpp
@ -568,16 +568,18 @@ void Dialog::resizeEvent(QResizeEvent *event)
|
|||||||
d->view->centerOn(graphicsWidget);
|
d->view->centerOn(graphicsWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
Plasma::Applet *applet = d->applet();
|
if (d->resizeStartCorner == -1) {
|
||||||
if (applet && !event->oldSize().isEmpty()) {
|
Plasma::Applet *applet = d->applet();
|
||||||
Plasma::Corona *corona = qobject_cast<Plasma::Corona *>(applet->scene());
|
if (applet && !event->oldSize().isEmpty()) {
|
||||||
if (corona) {
|
Plasma::Corona *corona = qobject_cast<Plasma::Corona *>(applet->scene());
|
||||||
QSize deltaSize(event->size() - event->oldSize());
|
if (corona) {
|
||||||
|
QSize deltaSize(event->size() - event->oldSize());
|
||||||
|
|
||||||
if (applet->location() == Plasma::BottomEdge) {
|
if (applet->location() == Plasma::BottomEdge) {
|
||||||
move(pos() - QPoint(0, deltaSize.height()));
|
move(pos() - QPoint(0, deltaSize.height()));
|
||||||
} else if (applet->location() == Plasma::RightEdge) {
|
} else if (applet->location() == Plasma::RightEdge) {
|
||||||
move(pos() - QPoint(deltaSize.width(), 0));
|
move(pos() - QPoint(deltaSize.width(), 0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user