diff layer/LinearNumericalScale.cpp @ 1276:b4cb11ca8233 horizontal-scale

Branch toward adding horizontal numerical scales to things
author Chris Cannam
date Tue, 01 May 2018 16:14:22 +0100
parents a34a2a25907c
children fc9d9f1103fa
line wrap: on
line diff
--- a/layer/LinearNumericalScale.cpp	Thu Apr 26 15:06:41 2018 +0100
+++ b/layer/LinearNumericalScale.cpp	Tue May 01 16:14:22 2018 +0100
@@ -26,9 +26,14 @@
 
 int
 LinearNumericalScale::getWidth(LayerGeometryProvider *,
-                               QPainter &paint)
+                                   QPainter &paint,
+                                   bool horizontal)
 {
-    return paint.fontMetrics().width("-000.00") + 10;
+    if (horizontal) {
+        return paint.fontMetrics().height() + 10;
+    } else {
+        return paint.fontMetrics().width("-000.00") + 10;
+    }
 }
 
 void