# HG changeset patch # User Chris Cannam # Date 1470404188 -3600 # Node ID 6eef0330ef122d485339361f89329b29f1667fef # Parent c53ed1a6fcbd78aedc2d13122a6b0a4f26529ea3 Make text labels on vertical scale ticks visible diff -r c53ed1a6fcbd -r 6eef0330ef12 layer/SpectrogramLayer.cpp --- 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;