Mercurial > hg > svgui
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 629:355fa700ce70 | 630:c3593bb2de6b |
|---|---|
| 1135 | 1135 |
| 1136 paint.drawRect(x, -1, nx - x, v->height() + 1); | 1136 paint.drawRect(x, -1, nx - x, v->height() + 1); |
| 1137 } | 1137 } |
| 1138 | 1138 |
| 1139 QString label = p.label; | 1139 QString label = p.label; |
| 1140 bool italic = false; | |
| 1140 | 1141 |
| 1141 if (label == "" && | 1142 if (label == "" && |
| 1142 (m_plotStyle == PlotPoints || | 1143 (m_plotStyle == PlotPoints || |
| 1143 m_plotStyle == PlotSegmentation)) { | 1144 m_plotStyle == PlotSegmentation)) { |
| 1144 label = QString("%1").arg(p.value); //??? but use italic? | 1145 label = QString("%1").arg(p.value); |
| 1146 italic = true; | |
| 1145 } | 1147 } |
| 1146 | 1148 |
| 1147 if (label != "") { | 1149 if (label != "") { |
| 1148 if (!haveNext || nx > x + 6 + paint.fontMetrics().width(p.label)) { | 1150 if (!haveNext || nx > x + 6 + paint.fontMetrics().width(p.label)) { |
| 1149 v->drawVisibleText(paint, x + 5, textY, label, View::OutlinedText); | 1151 v->drawVisibleText(paint, x + 5, textY, label, |
| 1152 italic ? | |
| 1153 View::OutlinedItalicText : | |
| 1154 View::OutlinedText); | |
| 1150 } | 1155 } |
| 1151 } | 1156 } |
| 1152 | 1157 |
| 1153 prevFrame = p.frame; | 1158 prevFrame = p.frame; |
| 1154 } | 1159 } |
