From: Jim Procter Date: Fri, 6 May 2016 13:20:41 +0000 (+0100) Subject: JAL-2100 optimisation X-Git-Tag: Release_2_10_0~227^2~2^2~8 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d9cca7f68d28a41d0d62510ceaf14b430f76fb8b;p=jalview.git JAL-2100 optimisation --- diff --git a/src/jalview/gui/ScalePanel.java b/src/jalview/gui/ScalePanel.java index 7c9b57e..909cbfb 100755 --- a/src/jalview/gui/ScalePanel.java +++ b/src/jalview/gui/ScalePanel.java @@ -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)); } }