# HG changeset patch # User Chris Cannam # Date 1288036358 -7200 # Node ID a4ba6c96b66daf4e33ed312e536111dab20280c7 # Parent bb1035a2495800978b955f370f66d81cdc10ee91 * Make text labels in time instant layer more apparent (use drawVisibleText) * Fix bug that caused time-instants in segmentation mode to come up white when zoomed far out diff -r bb1035a24958 -r a4ba6c96b66d layer/TimeInstantLayer.cpp --- a/layer/TimeInstantLayer.cpp Sun Oct 24 17:38:03 2010 +0200 +++ b/layer/TimeInstantLayer.cpp Mon Oct 25 21:52:38 2010 +0200 @@ -386,7 +386,8 @@ ++j; int x = v->getXForFrame(p.frame); - if (x == prevX && p.frame != illuminateFrame) continue; + if (x == prevX && m_plotStyle == PlotInstants && + p.frame != illuminateFrame) continue; int iw = v->getXForFrame(p.frame + m_model->getResolution()) - x; if (iw < 2) { @@ -434,7 +435,7 @@ paint.setPen(Qt::NoPen); } - paint.drawRect(x, -1, nx - x, v->height() + 1); + paint.drawRect(x, -1, nx - x, v->height() + 1); } odd = !odd; @@ -455,7 +456,8 @@ } if (good) { - paint.drawText(x + iw + 2, textY, p.label); + v->drawVisibleText(paint, x + iw + 2, textY, p.label, View::OutlinedText); +// paint.drawText(x + iw + 2, textY, p.label); } } diff -r bb1035a24958 -r a4ba6c96b66d layer/TimeValueLayer.cpp --- a/layer/TimeValueLayer.cpp Sun Oct 24 17:38:03 2010 +0200 +++ b/layer/TimeValueLayer.cpp Mon Oct 25 21:52:38 2010 +0200 @@ -1087,7 +1087,8 @@ if (p.label != "") { if (!haveNext || nx > x + 6 + paint.fontMetrics().width(p.label)) { - paint.drawText(x + 5, textY, p.label); + v->drawVisibleText(paint, x + 5, textY, p.label, View::OutlinedText); +// paint.drawText(x + 5, textY, p.label); } } }