From d9cca7f68d28a41d0d62510ceaf14b430f76fb8b Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 6 May 2016 14:20:41 +0100 Subject: [PATCH] JAL-2100 optimisation --- src/jalview/gui/ScalePanel.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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)); } } -- 1.7.10.2