diff layer/TimeValueLayer.cpp @ 630:c3593bb2de6b

Use italic for value labels (as opposed to label labels)
author Chris Cannam
date Tue, 16 Apr 2013 10:06:10 +0100
parents 355fa700ce70
children f69e08be3379
line wrap: on
line diff
--- a/layer/TimeValueLayer.cpp	Mon Apr 15 10:54:02 2013 +0100
+++ b/layer/TimeValueLayer.cpp	Tue Apr 16 10:06:10 2013 +0100
@@ -1137,16 +1137,21 @@
 	}
 
         QString label = p.label;
+        bool italic = false;
 
         if (label == "" &&
             (m_plotStyle == PlotPoints ||
              m_plotStyle == PlotSegmentation)) {
-            label = QString("%1").arg(p.value); //??? but use italic?
+            label = QString("%1").arg(p.value);
+            italic = true;
         }
 
 	if (label != "") {
             if (!haveNext || nx > x + 6 + paint.fontMetrics().width(p.label)) {
-                v->drawVisibleText(paint, x + 5, textY, label, View::OutlinedText);
+                v->drawVisibleText(paint, x + 5, textY, label,
+                                   italic ?
+                                   View::OutlinedItalicText :
+                                   View::OutlinedText);
             }
 	}