Take border sizes into account when drawing applets with background.
It's still busted right now though, since geometry() returns an empty rect (dunno why ... ) svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796898
This commit is contained in:
parent
1788dbed90
commit
b32216ac24
@ -642,9 +642,10 @@ void Applet::setDrawStandardBackground(bool drawBackground)
|
|||||||
d->background = new Plasma::SvgPanel("widgets/background");
|
d->background = new Plasma::SvgPanel("widgets/background");
|
||||||
int left, top, right, bottom;
|
int left, top, right, bottom;
|
||||||
d->getBorderSize(left, top, right, bottom);
|
d->getBorderSize(left, top, right, bottom);
|
||||||
//setContentsMargins(0, 0, right, bottom);
|
setContentsMargins(0, 0, right, bottom);
|
||||||
d->background->resize(geometry().size());
|
d->background->resize(QSize(geometry().width() + right + left, geometry().height() + top + bottom));
|
||||||
d->background->setPos(QPointF(0,0));
|
d->background->setPos(QPointF(-left, -top));
|
||||||
|
//kDebug() << geometry() << left << top << right << bottom;
|
||||||
}
|
}
|
||||||
} else if (d->background) {
|
} else if (d->background) {
|
||||||
delete d->background;
|
delete d->background;
|
||||||
|
Loading…
Reference in New Issue
Block a user