diff view/View.cpp @ 1273:61418c112281

Adjust y-coord of text labels to accommodate larger scaled fonts
author Chris Cannam
date Tue, 24 Apr 2018 10:15:54 +0100
parents 7527701c8076
children 769d7890203b
line wrap: on
line diff
--- a/view/View.cpp	Mon Apr 23 16:06:27 2018 +0100
+++ b/view/View.cpp	Tue Apr 24 10:15:54 2018 +0100
@@ -236,11 +236,11 @@
         }
     }
 
-    int y = 15 + paint.fontMetrics().ascent();
+    int y = ViewManager::scalePixelSize(15) + paint.fontMetrics().ascent();
 
     for (std::map<int, Layer *>::const_iterator i = sortedLayers.begin();
          i != sortedLayers.end(); ++i) {
-        if (i->second == layer) return y;
+        if (i->second == layer) break;
         y += paint.fontMetrics().height();
     }