JAL-2100 optimisation
[jalview.git] / src / jalview / gui / ScalePanel.java
index 7c9b57e..909cbfb 100755 (executable)
@@ -492,8 +492,8 @@ public class ScalePanel extends JPanel implements MouseMotionListener,
     int widthx = 1 + endx - startx;
 
     FontMetrics fm = gg.getFontMetrics(av.getFont());
-    int y = avCharHeight - fm.getDescent();
-
+    int y = avCharHeight, yOf = fm.getDescent();
+    y -= yOf;
     if (av.hasHiddenColumns())
     {
       // draw any hidden column markers
@@ -591,13 +591,14 @@ public class ScalePanel extends JPanel implements MouseMotionListener,
         gg.drawLine(((i - startx - 1) * avCharWidth) + (avCharWidth / 2),
                 y + 2,
                 ((i - startx - 1) * avCharWidth) + (avCharWidth / 2), y
-                        + (fm.getDescent() * 2));
+                        + (yOf * 2));
       }
       else
       {
         gg.drawLine(((i - startx - 1) * avCharWidth) + (avCharWidth / 2), y
-                + fm.getDescent(), ((i - startx - 1) * avCharWidth)
-                + (avCharWidth / 2), y + (fm.getDescent() * 2));
+                + yOf,
+                ((i - startx - 1) * avCharWidth) + (avCharWidth / 2), y
+                        + (yOf * 2));
       }
     }