changeset 1226:6f0d7aa25816

Scale pen used for centre line
author Chris Cannam
date Thu, 26 Jan 2017 21:16:37 +0000
parents 37f86e26a8d2
children a8e126fe6a53
files view/Pane.cpp
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/view/Pane.cpp	Thu Jan 26 21:15:36 2017 +0000
+++ b/view/Pane.cpp	Thu Jan 26 21:16:37 2017 +0000
@@ -566,6 +566,8 @@
 {
     Layer *scaleLayer = 0;
 
+//    cerr << "Pane::drawVerticalScale[" << this << "]" << endl;
+    
     double min, max;
     bool log;
     QString unit;
@@ -580,6 +582,8 @@
     int sw = topLayer->getVerticalScaleWidth
         (this, m_manager->shouldShowVerticalColourScale(), paint);
 
+//    cerr << "sw = " << sw << endl;
+    
     if (sw > 0) {
         scaleLayer = topLayer;
         m_scaleWidth = sw;
@@ -645,7 +649,9 @@
     }
 
     if (!scaleLayer) m_scaleWidth = 0;
-        
+
+//    cerr << "m_scaleWidth = " << m_scaleWidth << ", r.left = " << r.left() << endl;
+    
     if (m_scaleWidth > 0 && r.left() < m_scaleWidth) {
 
 //      Profiler profiler("Pane::paintEvent - painting vertical scale", true);
@@ -734,7 +740,7 @@
         c = QColor(240, 240, 240);
     }
 
-    paint.setPen(c);
+    paint.setPen(PaintAssistant::scalePen(c));
     int x = width() / 2;
 
     if (!omitLine) {