diff layer/Colour3DPlotLayer.cpp @ 457:e75f15c9ea11

* Fix failure to include audio files in default open-file dialog invoked from toolbar button! * Some adjustments to vertical scale presentation in colour 3d plot with a lot of vertical bins
author Chris Cannam
date Wed, 03 Dec 2008 16:25:47 +0000
parents 035d62c4cddf
children 272e58f0bf8b
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp	Tue Dec 02 17:17:25 2008 +0000
+++ b/layer/Colour3DPlotLayer.cpp	Wed Dec 03 16:25:47 2008 +0000
@@ -559,7 +559,7 @@
 
     QFont tf = paint.font();
     if (paint.fontMetrics().height() >= binHeight) {
-        tf.setPixelSize(binHeight > 4 ? binHeight - 2 : 2);
+        tf.setPixelSize(binHeight > 7 ? binHeight - 2 : 5);
         paint.setFont(tf);
     }
 
@@ -581,6 +581,13 @@
 
 	paint.drawLine(cw, y0, w, y0);
 
+        if (step > 1) {
+            paint.drawLine(w - 1, y0 - (step * binHeight) + 1,
+                           w - 1, y0 - binHeight - 1);
+            paint.drawLine(w - 2, y0 - (step * binHeight) + 1,
+                           w - 2, y0 - binHeight - 2);
+        }
+
 	int cy = int(y0 - (step * binHeight)/2);
 	int ty = cy + paint.fontMetrics().ascent()/2;