Alignment of labels and text
[jalview.git] / src / jalview / gui / AnnotationPanel.java
index 86fef5f..2f444d6 100755 (executable)
@@ -687,11 +687,11 @@ public class AnnotationPanel
 \r
     AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();\r
 \r
-    int x = 0, y = 0;\r
+    int x = 0, y=0;\r
     int column = 0;\r
     char lastSS;\r
     int lastSSX;\r
-    int iconOffset = av.charHeight / 2;\r
+    int iconOffset = 0;\r
     boolean validRes = false;\r
 \r
     boolean[] graphGroupDrawn = new boolean[aa.length];\r
@@ -721,9 +721,20 @@ public class AnnotationPanel
 \r
         if (row.hasText)\r
         {\r
+          iconOffset = av.charHeight / 2 + 4;\r
           y -= av.charHeight;\r
         }\r
       }\r
+      else if (row.hasText)\r
+      {\r
+        iconOffset = av.charHeight -fm.getDescent();\r
+\r
+      }\r
+      else\r
+      {\r
+        iconOffset = 0;\r
+      }\r
+\r
 \r
       if (av.updatingConsensus && aa[i] == av.consensus)\r
       {\r
@@ -763,14 +774,7 @@ public class AnnotationPanel
         continue;\r
       }\r
 \r
-      if (row.hasText)\r
-      {\r
-        iconOffset = av.charHeight / 2 + 4;\r
-      }\r
-      else\r
-      {\r
-        iconOffset = 0;\r
-      }\r
+\r
 \r
       x = 0;\r
       while (x < endRes - startRes)\r