Removed obsolete call to updateDialogPosition, and use this function in dialogSizeChanged() for consistent dialog position. This solves the problem of the dialog being moved twice when the size of the widget changes.

svn path=/trunk/KDE/kdelibs/; revision=892689
This commit is contained in:
Rob Scheepmaker 2008-12-04 23:57:47 +00:00
parent 8994cc5ad6
commit 5ba015fa56

View File

@ -357,7 +357,6 @@ void PopupApplet::showPopup(uint popupDuration)
{
if (d->dialog && (formFactor() == Horizontal || formFactor() == Vertical)) {
d->dialog->show();
d->updateDialogPosition();
KWindowSystem::setState(d->dialog->winId(), NET::SkipTaskbar | NET::SkipPager);
if (d->timer) {
@ -476,8 +475,7 @@ void PopupAppletPrivate::dialogSizeChanged()
{
//Reposition the dialog
if (dialog) {
//dialog->updateGeometry();
dialog->move(q->popupPosition(dialog->size()));
updateDialogPosition();
KConfigGroup sizeGroup = q->config();
sizeGroup = KConfigGroup(&sizeGroup, "PopupApplet");
@ -503,7 +501,7 @@ void PopupAppletPrivate::updateDialogPosition()
KConfigGroup sizeGroup = q->config();
sizeGroup = KConfigGroup(&sizeGroup, "PopupApplet");
Q_ASSERT(q->containment());
Q_ASSERT(q->containment()->corona());
const int width = qMin(sizeGroup.readEntry("DialogWidth", 0),