move the dialog in relation to the delta of the size change when the applet localtion is bottom or right, instead of calling popupposition each time
svn path=/trunk/KDE/kdelibs/; revision=1111730
This commit is contained in:
parent
3660bcf30d
commit
2cecd31fe2
10
dialog.cpp
10
dialog.cpp
@ -567,10 +567,16 @@ void Dialog::resizeEvent(QResizeEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Plasma::Applet *applet = d->applet();
|
Plasma::Applet *applet = d->applet();
|
||||||
if (applet) {
|
if (applet && !event->oldSize().isEmpty()) {
|
||||||
Plasma::Corona *corona = qobject_cast<Plasma::Corona *>(applet->scene());
|
Plasma::Corona *corona = qobject_cast<Plasma::Corona *>(applet->scene());
|
||||||
if (corona) {
|
if (corona) {
|
||||||
move(corona->popupPosition(applet, size()));
|
QSize deltaSize(event->size() - event->oldSize());
|
||||||
|
|
||||||
|
if (applet->location() == Plasma::BottomEdge) {
|
||||||
|
move(pos() - QPoint(0, deltaSize.height()));
|
||||||
|
} else if (applet->location() == Plasma::RightEdge) {
|
||||||
|
move(pos() - QPoint(deltaSize.width(), 0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user