Mercurial > hg > svgui
changeset 384:c1e5af9f2c3c
...
author | Chris Cannam |
---|---|
date | Mon, 12 May 2008 12:38:59 +0000 |
parents | b35184d0dfe5 |
children | c0818f064e66 |
files | view/Pane.cpp view/View.cpp view/View.h |
diffstat | 3 files changed, 20 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/view/Pane.cpp Fri May 09 12:39:02 2008 +0000 +++ b/view/Pane.cpp Mon May 12 12:38:59 2008 +0000 @@ -974,8 +974,14 @@ .arg(nativeRate) .arg(srNote); - if (r.x() < m_scaleWidth + 5 + paint.fontMetrics().width(desc)) { - drawVisibleText(paint, m_scaleWidth + 5, + int x = m_scaleWidth + 5; + int pbw = getProgressBarWidth(); + if (x < pbw + 5) x = pbw + 5; + + std::cerr << "x = " << x << ", pbw = " << pbw << std::endl; + + if (r.x() < x + paint.fontMetrics().width(desc)) { + drawVisibleText(paint, x, height() - fontHeight + fontAscent - 6, desc, OutlinedText); }
--- a/view/View.cpp Fri May 09 12:39:02 2008 +0000 +++ b/view/View.cpp Mon May 12 12:38:59 2008 +0000 @@ -1421,6 +1421,17 @@ } } +int +View::getProgressBarWidth() const +{ + for (ProgressMap::const_iterator i = m_progressBars.begin(); + i != m_progressBars.end(); ++i) { + if (i->second && i->second->isVisible()) return i->second->width(); + } + + return 0; +} + void View::setPaintFont(QPainter &paint) {