Mercurial > hg > svgui
changeset 1144:6eef0330ef12 spectrogram-minor-refactor
Make text labels on vertical scale ticks visible
author | Chris Cannam |
---|---|
date | Fri, 05 Aug 2016 14:36:28 +0100 |
parents | c53ed1a6fcbd |
children | 17f999cd0a22 |
files | layer/SpectrogramLayer.cpp |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/layer/SpectrogramLayer.cpp Fri Aug 05 14:31:16 2016 +0100 +++ b/layer/SpectrogramLayer.cpp Fri Aug 05 14:36:28 2016 +0100 @@ -2152,7 +2152,6 @@ paint.drawText((cw + 6 - paint.fontMetrics().width("dBFS")) / 2, 2 + textHeight + toff, "dBFS"); -// paint.drawText((cw + 6 - paint.fontMetrics().width(top)) / 2, paint.drawText(3 + cw - cbw - paint.fontMetrics().width(top), 2 + textHeight * topLines + toff + textHeight/2, top); @@ -2176,7 +2175,7 @@ int y = textHeight * topLines + 4 + ch - i; paint.drawLine(5 + cw - cbw, y, cw + 2, y); - + if (i == 0) { lasty = y; lastdb = idb; @@ -2186,11 +2185,10 @@ idb % 10 == 0) || (abs(y - lasty) > paint.fontMetrics().ascent() && idb % 5 == 0))) { - paint.setPen(v->getBackground()); + paint.setPen(v->getForeground()); QString text = QString("%1").arg(idb); paint.drawText(3 + cw - cbw - paint.fontMetrics().width(text), y + toff + textHeight/2, text); - paint.setPen(v->getForeground()); paint.drawLine(5 + cw - cbw, y, 8 + cw - cbw, y); lasty = y; lastdb = idb;