# HG changeset patch # User Chris Cannam # Date 1210595939 0 # Node ID c1e5af9f2c3cb07614e943d5499a04b8c253af9c # Parent b35184d0dfe5a25b03d7e0ef8e38370ca7b26a35 ... diff -r b35184d0dfe5 -r c1e5af9f2c3c view/Pane.cpp --- 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); } diff -r b35184d0dfe5 -r c1e5af9f2c3c view/View.cpp --- 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) { diff -r b35184d0dfe5 -r c1e5af9f2c3c view/View.h --- a/view/View.h Fri May 09 12:39:02 2008 +0000 +++ b/view/View.h Mon May 12 12:38:59 2008 +0000 @@ -336,6 +336,7 @@ bool setCentreFrame(size_t f, bool doEmit); void checkProgress(void *object); + int getProgressBarWidth() const; // if visible size_t m_centreFrame; int m_zoomLevel;