From 41ab1a27c130248c35fdaa9438b5d6cf2c4f181b Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sat, 26 Jul 2008 15:05:16 +0000 Subject: [PATCH] take margins into account svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=838051 --- popupapplet.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/popupapplet.cpp b/popupapplet.cpp index 45fd3f36b..c7a73e9f5 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -122,7 +122,7 @@ void PopupApplet::constraintsEvent(Plasma::Constraints constraints) d->layout->removeAt(0); switch (formFactor()) { case Plasma::Planar: - case Plasma::MediaCenter: + case Plasma::MediaCenter: { delete d->dialog; d->dialog = 0; @@ -134,10 +134,13 @@ void PopupApplet::constraintsEvent(Plasma::Constraints constraints) d->proxy->show(); } - d->layout->addItem(d->proxy); - setMinimumSize(widget() ? widget()->minimumSize() : QSizeF(300, 200)); - break; + //get the margins + QSizeF marginSize = size() - contentsRect().size(); + d->layout->addItem(d->proxy); + setMinimumSize(widget() ? widget()->minimumSize() + marginSize : QSizeF(300, 200)); + break; + } case Plasma::Horizontal: case Plasma::Vertical: setAspectRatioMode(Plasma::Square);