don't produce errors if our content is empty
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=766098
This commit is contained in:
parent
74a5773d79
commit
67aae7bf6e
@ -232,9 +232,13 @@ public:
|
||||
// the transparent border around the svg seems to vary in size depending on the size of the svg and as a result increasing the
|
||||
// svn image by 2 all around didn't resolve the issue. For now it resizes based on the border size.
|
||||
|
||||
if (contentWidth > 0 && contentHeight > 0) {
|
||||
background->resize(contentWidth, contentHeight);
|
||||
background->paint(&p, QRect(contentLeft-leftWidth, contentTop-topHeight, contentWidth+leftWidth*2, contentHeight+topHeight*2), "center");
|
||||
background->paint(&p, QRect(contentLeft-leftWidth, contentTop-topHeight,
|
||||
contentWidth+leftWidth*2, contentHeight+topHeight*2),
|
||||
"center");
|
||||
background->resize();
|
||||
}
|
||||
|
||||
background->paint(&p, QRect(leftOffset, topOffset, leftWidth, topHeight), "topleft");
|
||||
background->paint(&p, QRect(rightOffset, topOffset,rightWidth, topHeight), "topright");
|
||||
|
Loading…
Reference in New Issue
Block a user