]> gerrit.simantics Code Review - simantics/district.git/commitdiff
Fix hover info text size to be readable with all display zoom settings 23/3523/2
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 15 Nov 2019 05:25:19 +0000 (07:25 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 15 Nov 2019 05:27:20 +0000 (07:27 +0200)
gitlab #44

Change-Id: I004a69571a10f9313dc7244c43f1906dc7d6aabc

org.simantics.district.imports/.project
org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkHoverInfoNode.java
org.simantics.district.repository/.project

index aebad524639ff08070b42daa6ad05afd19d6c99b..a01e1aebd25d7f9755164209f4f25bd93af093c4 100644 (file)
                        <arguments>\r
                        </arguments>\r
                </buildCommand>\r
-               <buildCommand>\r
-                       <name>org.eclipse.m2e.core.maven2Builder</name>\r
-                       <arguments>\r
-                       </arguments>\r
-               </buildCommand>\r
        </buildSpec>\r
        <natures>\r
-               <nature>org.eclipse.m2e.core.maven2Nature</nature>\r
                <nature>org.eclipse.pde.PluginNature</nature>\r
                <nature>org.eclipse.jdt.core.javanature</nature>\r
        </natures>\r
index 24b7f5898c0dd0a06970ce1b28147c1b623120d2..f263dc2216383bf90c0f5c223982d6deaf787453 100644 (file)
@@ -14,7 +14,6 @@ import java.util.concurrent.atomic.AtomicReference;
 import java.util.function.ToIntFunction;
 
 import org.simantics.district.network.ui.styles.DistrictNetworkHoverInfoStyle;
-import org.simantics.maps.MapScalingTransform;
 import org.simantics.scenegraph.INode;
 import org.simantics.scenegraph.NodeException;
 import org.simantics.scenegraph.ParentNode;
@@ -38,10 +37,7 @@ public class DistrictNetworkHoverInfoNode extends G2DNode implements HoverSensit
 
     private List<Tuple3> labels;
 
-    private Font font = new Font(
-            Font.SANS_SERIF,
-            Font.PLAIN,
-            (int)(DPIUtil.upscale(9) * MapScalingTransform.getScaleY() + 0.5));
+    private Font font = new Font(Font.SANS_SERIF, Font.PLAIN, DPIUtil.upscale(14));
 
     @SuppressWarnings("unused")
     private Point2D origin;
@@ -90,9 +86,8 @@ public class DistrictNetworkHoverInfoNode extends G2DNode implements HoverSensit
 
         g.translate(mousePosition.getX(), mousePosition.getY());
         //g.translate(origin.getX(), origin.getY());
-        double scale = DPIUtil.upscale( 1.25 / GeometryUtils.getScale(g.getTransform()) );
+        double scale = 1.0 / GeometryUtils.getScale(g.getTransform());
         g.scale(scale, scale);
-
         g.setFont(font);
 
         FontMetrics fm = g.getFontMetrics();
index 40015b9e6b7c8f81d0888af88c889e4f37b83f78..6771a961f03700f22251f296d0e4c8695462b387 100644 (file)
                        <arguments>
                        </arguments>
                </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.m2e.core.maven2Builder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
        </buildSpec>
        <natures>
-               <nature>org.eclipse.m2e.core.maven2Nature</nature>
                <nature>org.eclipse.pde.UpdateSiteNature</nature>
        </natures>
 </projectDescription>