Mercurial > hg > svgui
changeset 576:a4ba6c96b66d
* 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
author | Chris Cannam |
---|---|
date | Mon, 25 Oct 2010 21:52:38 +0200 |
parents | bb1035a24958 |
children | dc511d5fee75 |
files | layer/TimeInstantLayer.cpp layer/TimeValueLayer.cpp |
diffstat | 2 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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); } }
--- 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); } } }