[Kst] branches/work/kst/portto4/kst/src/libkstapp

Mike Fenton mike at staikos.net
Wed Jan 30 22:32:37 CET 2008


SVN commit 768898 by fenton:

Ensure that the top most axis label and the right most axis label are always fully drawn.


 M  +8 -0      plotaxisitem.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/plotaxisitem.cpp #768897:768898
@@ -246,6 +246,10 @@
     p.setX(p.x() - bound.width() / 2.0);
     bound.moveCenter(p);
 
+    if (bound.top() < rect().top()) {
+      bound.moveBottom(bound.bottom() + (rect().top() - bound.top()));
+    }
+
     if (yLabelRect.isValid()) {
       yLabelRect = yLabelRect.united(bound);
     } else {
@@ -265,6 +269,10 @@
     p.setY(p.y() + bound.height() / 2.0);
     bound.moveCenter(p);
 
+    if (bound.right() > rect().right()) {
+      bound.moveLeft(bound.left() - (bound.right() - rect().right()));
+    }
+
     if (xLabelRect.isValid()) {
       xLabelRect = xLabelRect.united(bound);
     } else {


More information about the Kst mailing list