take margins into account
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=838051
This commit is contained in:
parent
263870d46d
commit
41ab1a27c1
@ -122,7 +122,7 @@ void PopupApplet::constraintsEvent(Plasma::Constraints constraints)
|
|||||||
d->layout->removeAt(0);
|
d->layout->removeAt(0);
|
||||||
switch (formFactor()) {
|
switch (formFactor()) {
|
||||||
case Plasma::Planar:
|
case Plasma::Planar:
|
||||||
case Plasma::MediaCenter:
|
case Plasma::MediaCenter: {
|
||||||
delete d->dialog;
|
delete d->dialog;
|
||||||
d->dialog = 0;
|
d->dialog = 0;
|
||||||
|
|
||||||
@ -134,10 +134,13 @@ void PopupApplet::constraintsEvent(Plasma::Constraints constraints)
|
|||||||
d->proxy->show();
|
d->proxy->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
d->layout->addItem(d->proxy);
|
//get the margins
|
||||||
setMinimumSize(widget() ? widget()->minimumSize() : QSizeF(300, 200));
|
QSizeF marginSize = size() - contentsRect().size();
|
||||||
break;
|
|
||||||
|
|
||||||
|
d->layout->addItem(d->proxy);
|
||||||
|
setMinimumSize(widget() ? widget()->minimumSize() + marginSize : QSizeF(300, 200));
|
||||||
|
break;
|
||||||
|
}
|
||||||
case Plasma::Horizontal:
|
case Plasma::Horizontal:
|
||||||
case Plasma::Vertical:
|
case Plasma::Vertical:
|
||||||
setAspectRatioMode(Plasma::Square);
|
setAspectRatioMode(Plasma::Square);
|
||||||
|
Loading…
Reference in New Issue
Block a user