Mercurial > hg > svgui
diff view/View.cpp @ 279:47fe0352861e
* add pitch label to spectrogram harmonic cursor as well
author | Chris Cannam |
---|---|
date | Tue, 03 Jul 2007 18:56:27 +0000 |
parents | a078aa2932cc |
children | 86a112b5b319 |
line wrap: on
line diff
--- a/view/View.cpp Tue Jul 03 18:47:39 2007 +0000 +++ b/view/View.cpp Tue Jul 03 18:56:27 2007 +0000 @@ -620,6 +620,19 @@ { if (style == OutlinedText) { + paint.save(); + + QColor penColour, surroundColour; + + if (hasLightBackground()) { + penColour = Qt::black; + surroundColour = Qt::white; + } else { + penColour = Qt::white; + surroundColour = Qt::black; + } + +/* QColor origPenColour = paint.pen().color(); QColor penColour = origPenColour; QColor surroundColour = Qt::white; //palette().background().color(); @@ -630,7 +643,7 @@ penColour = QColor::fromHsv(h, s, 255 - v); surroundColour = Qt::black; } - +*/ paint.setPen(surroundColour); for (int dx = -1; dx <= 1; ++dx) { @@ -643,8 +656,10 @@ paint.setPen(penColour); paint.drawText(x, y, text); - +/* paint.setPen(origPenColour); +*/ + paint.restore(); } else {