[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/libs/plasma
From:       Sebastian Kügler <sebas () kde ! nl>
Date:       2008-04-14 14:04:01
Message-ID: 1208181841.204327.9795.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 796898 by sebas:

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 ... )


 M  +9 -8      applet.cpp  


--- trunk/KDE/kdebase/workspace/libs/plasma/applet.cpp #796897:796898
@@ -642,9 +642,10 @@
             d->background = new Plasma::SvgPanel("widgets/background");
             int left, top, right, bottom;
             d->getBorderSize(left, top, right, bottom);
-            //setContentsMargins(0, 0, right, bottom);
-            d->background->resize(geometry().size());
-            d->background->setPos(QPointF(0,0));
+            setContentsMargins(0, 0, right, bottom);
+            d->background->resize(QSize(geometry().width() + right + left, \
geometry().height() + top + bottom)); +            \
d->background->setPos(QPointF(-left, -top)); +            //kDebug() << geometry() << \
left << top << right << bottom;  }
     } else if (d->background) {
         delete d->background;
@@ -1431,12 +1432,12 @@
     Widget::setGeometry(geometry);
     if (geometry.size() != beforeGeom.size())
     {
-	updateConstraints(Plasma::SizeConstraint);
-	if (d->background) {
-	    d->background->resize(boundingRect().size());
-	}
-	emit geometryChanged();
+    updateConstraints(Plasma::SizeConstraint);
+    if (d->background) {
+        d->background->resize(boundingRect().size());
     }
+    emit geometryChanged();
+    }
     if (geometry.topLeft() != beforeGeom.topLeft())
     {
       emit geometryChanged();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic