From 2cecd31fe2c0ed04b35377c9e88d23784064b971 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 6 Apr 2010 15:04:33 +0000 Subject: [PATCH] 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 --- dialog.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dialog.cpp b/dialog.cpp index de248308b..03f8ca878 100644 --- a/dialog.cpp +++ b/dialog.cpp @@ -567,10 +567,16 @@ void Dialog::resizeEvent(QResizeEvent *event) } Plasma::Applet *applet = d->applet(); - if (applet) { + if (applet && !event->oldSize().isEmpty()) { Plasma::Corona *corona = qobject_cast(applet->scene()); 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)); + } } } }