diff layer/TimeValueLayer.cpp @ 1401:28075cc658c9

Scale pen for retina display on macOS as well as for hidpi display elsewhere
author Chris Cannam
date Thu, 15 Nov 2018 14:04:32 +0000
parents c39f2d439d59
children b0eeec95ab5b
line wrap: on
line diff
--- a/layer/TimeValueLayer.cpp	Thu Nov 15 13:06:38 2018 +0000
+++ b/layer/TimeValueLayer.cpp	Thu Nov 15 14:04:32 2018 +0000
@@ -565,7 +565,7 @@
     }
 
     if (!usePoints.empty()) {
-        int fuzz = ViewManager::scalePixelSize(2);
+        int fuzz = v->scaleSize(2);
         int px = v->getXForFrame(usePoints.begin()->frame);
         if ((px > x && px - x > fuzz) ||
             (px < x && x - px > fuzz + 3)) {
@@ -1061,7 +1061,7 @@
             brush = QBrush(Qt::NoBrush);
         }
         
-        paint.setPen(PaintAssistant::scalePen(pen));
+        paint.setPen(v->scalePen(pen));
         paint.setBrush(brush);
         
         if (m_plotStyle == PlotStems) {
@@ -1092,7 +1092,7 @@
             m_plotStyle != PlotSegmentation) {
             if (illuminate) {
                 paint.save();
-                paint.setPen(PaintAssistant::scalePen(getForegroundQColor(v)));
+                paint.setPen(v->scalePen(getForegroundQColor(v)));
                 paint.setBrush(getForegroundQColor(v));
             }
             if (m_plotStyle != PlotStems ||
@@ -1114,7 +1114,7 @@
                 if (m_plotStyle == PlotConnectedPoints) {
                     
                     paint.save();
-                    paint.setPen(PaintAssistant::scalePen(brushColour));
+                    paint.setPen(v->scalePen(brushColour));
                     paint.drawLine(x + w, y, nx, ny);
                     paint.restore();
 
@@ -1173,7 +1173,7 @@
             
             if (nx <= x) continue;
 
-            paint.setPen(PaintAssistant::scalePen(QPen(getForegroundQColor(v), 2)));
+            paint.setPen(v->scalePen(QPen(getForegroundQColor(v), 2)));
 
             if (!illuminate) {
                 if (!m_drawSegmentDivisions ||