]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@22893 ac1ea38d-2e2b...
authorvillberg <villberg@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 20 Oct 2011 12:24:20 +0000 (12:24 +0000)
committervillberg <villberg@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 20 Oct 2011 12:24:20 +0000 (12:24 +0000)
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverTextNode.java

index ef8bab71ea485032fc67b9c2fe74d1521ab4fc6e..b01d51363df8be02c2d5e578a3e0d0fca18f338b 100644 (file)
@@ -46,13 +46,13 @@ public class HoverTextNode extends TextNode implements ISelectionPainterNode {
             Color oldColor = g.getColor();\r
             g.setColor(Color.LIGHT_GRAY);\r
             g.setStroke(new BasicStroke((float)(2.0f)));\r
-            g.translate(x, y);\r
             g.scale(scale, scale);\r
-            g.draw(expandBoundsUnscaled(getTextBounds()));\r
+            g.translate(x, y);\r
+            g.draw(expandBoundsUnscaled(alignBounds(getTextBounds())));\r
             g.translate(-x, -y);\r
+            g.scale(scaleRecip, scaleRecip);\r
             g.setColor(oldColor);\r
             g.setStroke(oldStroke);\r
-            g.scale(scaleRecip, scaleRecip);\r
             \r
         }\r
 \r