diff view/Overview.cpp @ 972:1011ffb1b6d5 osx-retina

Merge from default branch
author Chris Cannam
date Wed, 10 Jun 2015 13:38:02 +0100
parents 73b0dc7d6ec1
children 57d192e26331 97d0c798c2ac
line wrap: on
line diff
--- a/view/Overview.cpp	Thu May 21 16:05:14 2015 +0100
+++ b/view/Overview.cpp	Wed Jun 10 13:38:02 2015 +0100
@@ -35,6 +35,10 @@
     m_followZoom = false;
     setPlaybackFollow(PlaybackIgnore);
     m_modelTestTime.start();
+
+    bool light = hasLightBackground();
+    if (light) m_boxColour = Qt::darkGray;
+    else m_boxColour = Qt::lightGray;
 }
 
 void
@@ -159,6 +163,12 @@
 }
 
 void
+Overview::setBoxColour(QColor c)
+{
+    m_boxColour = c;
+}
+
+void
 Overview::paintEvent(QPaintEvent *e)
 {
     // Recalculate zoom in case the size of the widget has changed.
@@ -263,7 +273,7 @@
     
     foreach (QRect vr, rects) {
         paint.setBrush(Qt::NoBrush);
-        paint.setPen(QPen(Qt::gray, 2));
+        paint.setPen(QPen(m_boxColour, 2));
         paint.drawRoundedRect(vr, 4, 4);
     }