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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/applets/pager
From:       Artur Duque de Souza <morpheuz () gmail ! com>
Date:       2009-02-28 2:46:34
Message-ID: 1235789194.559204.29434.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 933129 by asouza:

For the default size of the panel we can allow this "one pixel"
offset on the bottom. The applet is so small that you almost
can't see the offset and this brings back the labels for the
panel's default size.

For bigger sizes it works perfectly. Anyway, a better solution
is welcome ;) We don't like dealing with 'magical math'.

BUG:184152


 M  +7 -2      pager.cpp  


--- trunk/KDE/kdebase/workspace/plasma/applets/pager/pager.cpp #933128:933129
@@ -1118,9 +1118,14 @@
             QRectF target = m_rects[i];
             //take also shadow position and radius into account
             //kDebug() << target << result.height();
-            if (target.height() >= result.height() - radius * 2) {
-                QPointF paintPoint = target.center() - (result.rect().center() + \
QPoint(radius, radius));   
+            // for the default size of the panel we can allow this "one pixel"
+            // offset on the bottom. the applet is so small that you almost
+            // can't see the offset and this brings back the labels for the
+            // panel's default size.
+            if (target.height() + 1 >= result.height() - radius * 2) {
+                QPointF paintPoint = target.center() - (result.rect().center() + \
QPoint(radius, radius)); +
                 if (paintPoint.x() + radius < target.x() + 1) {
                     paintPoint.setX(target.x() + 1 - radius);
                 }


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

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