diff view/View.cpp @ 663:1a0fdad4af4d tonioni

Merge from the default branch
author Chris Cannam
date Fri, 12 Jul 2013 13:25:22 +0100
parents c3593bb2de6b
children 0aea4b9e4c3d
line wrap: on
line diff
--- a/view/View.cpp	Thu Jun 20 13:47:36 2013 +0100
+++ b/view/View.cpp	Fri Jul 12 13:25:22 2013 +0100
@@ -731,10 +731,16 @@
 void
 View::drawVisibleText(QPainter &paint, int x, int y, QString text, TextStyle style) const
 {
-    if (style == OutlinedText) {
+    if (style == OutlinedText || style == OutlinedItalicText) {
 
         paint.save();
 
+        if (style == OutlinedItalicText) {
+            QFont f(paint.font());
+            f.setItalic(true);
+            paint.setFont(f);
+        }
+
         QColor penColour, surroundColour, boxColour;
 
         penColour = getForeground();
@@ -744,6 +750,7 @@
 
         paint.setPen(Qt::NoPen);
         paint.setBrush(boxColour);
+        
         QRect r = paint.fontMetrics().boundingRect(text);
         r.translate(QPoint(x, y));
 //        std::cerr << "drawVisibleText: r = " << r.x() << "," <<r.y() << " " << r.width() << "x" << r.height() << std::endl;