Mercurial > hg > svgui
diff view/View.cpp @ 501:08e1ccfe289c
* Show duration at both ends of selection if space permits (#2065013)
* Tool tip for zoom reset button
author | Chris Cannam |
---|---|
date | Tue, 24 Feb 2009 12:17:18 +0000 |
parents | b77b79413cdb |
children | 683c46d7500b |
line wrap: on
line diff
--- a/view/View.cpp Tue Feb 24 12:02:19 2009 +0000 +++ b/view/View.cpp Tue Feb 24 12:17:18 2009 +0000 @@ -1858,9 +1858,12 @@ int ex = sx; int dx = sx; + bool durationBothEnds = true; + if (sw + ew > (p1 - p0)) { ey += metrics.height(); dy += metrics.height(); + durationBothEnds = false; } if (ew < (p1 - p0)) { @@ -1874,6 +1877,9 @@ paint.drawText(sx, sy, startText); paint.drawText(ex, ey, endText); paint.drawText(dx, dy, durationText); + if (durationBothEnds) { + paint.drawText(sx, dy, durationText); + } } }