From: miettinen Date: Wed, 16 Apr 2014 11:20:43 +0000 (+0000) Subject: Both horizontal and vertical center alignment to Sysdyn loop symbol text (refs #4803). X-Git-Tag: 1.8.1~83 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=2ad3d9b7896d19bde5a0988c1e6114a9f0eb6a91;p=simantics%2Fsysdyn.git Both horizontal and vertical center alignment to Sysdyn loop symbol text (refs #4803). git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29297 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/LoopFactory.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/LoopFactory.java index 0b83ef3f..473ee7a1 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/LoopFactory.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/LoopFactory.java @@ -282,8 +282,10 @@ public class LoopFactory extends SysdynElementFactory { Alignment alignment = Alignment.CENTER; name.setTransform(at2); - if(alignment != null) + if(alignment != null) { name.setHorizontalAlignment((byte) alignment.ordinal()); + name.setVerticalAlignment((byte) alignment.ordinal()); + } } } } @@ -295,7 +297,7 @@ public class LoopFactory extends SysdynElementFactory { private static double getYCoordShift(IElement e) { //String location = e.getHint(SysdynElementHints.KEY_LOCATION); - return 10.7; + return 9.7; } @Override