Mercurial > hg > svgui
diff view/Overview.cpp @ 935:1c529a22a6a7 tonioni
changed rectangle in Overview: colour and roundedness
author | matthiasm |
---|---|
date | Mon, 30 Mar 2015 14:14:33 +0100 |
parents | 26da827e8fb5 |
children | 73b0dc7d6ec1 |
line wrap: on
line diff
--- a/view/Overview.cpp Wed Mar 25 11:48:33 2015 +0000 +++ b/view/Overview.cpp Mon Mar 30 14:14:33 2015 +0100 @@ -235,13 +235,14 @@ int x0 = getXForFrame(f0); int x1 = getXForFrame(f1); + if (x1 <= x0) x1 = x0 + 1; std::pair<int, int> extent(x0, x1); if (extents.find(extent) == extents.end()) { - y += height() / 10 + 1; + y += height() / 10 + 1; extents.insert(extent); QRect vr(x0, y, x1 - x0, height() - 2 * y); @@ -251,19 +252,19 @@ } QPainterPath without; - without.addRoundedRect(primary, 8, 8); + without.addRoundedRect(primary, 4, 4); without.addRect(rect()); paint.setPen(Qt::NoPen); paint.setBrush(getFillWithout()); paint.drawPath(without); paint.setBrush(getFillWithin()); - paint.drawRoundedRect(primary, 8, 8); + paint.drawRoundedRect(primary, 4, 4); foreach (QRect vr, rects) { paint.setBrush(Qt::NoBrush); - paint.setPen(QPen(getForeground(), 2)); - paint.drawRoundedRect(vr, 8, 8); + paint.setPen(QPen(Qt::gray, 2)); + paint.drawRoundedRect(vr, 4, 4); } paint.end();