# HG changeset patch # User Chris Cannam # Date 1306242335 -3600 # Node ID 7ef46fb73b486976ab95d190d40d55727589e310 # Parent 5cc0d897eb2641898bea41e9ad7ea9ec88d2faca Use rounded rectangles throughout diff -r 5cc0d897eb26 -r 7ef46fb73b48 src/changesetdetailitem.cpp --- a/src/changesetdetailitem.cpp Tue May 24 13:29:27 2011 +0100 +++ b/src/changesetdetailitem.cpp Tue May 24 14:05:35 2011 +0100 @@ -86,7 +86,7 @@ QRectF r(0.5, 0.5, width - 1, height - 1); paint->setBrush(Qt::white); - paint->drawRect(r); + paint->drawRoundedRect(r, 10, 10); if (scale < 0.1) { paint->restore(); diff -r 5cc0d897eb26 -r 7ef46fb73b48 src/changesetitem.cpp --- a/src/changesetitem.cpp Tue May 24 13:29:27 2011 +0100 +++ b/src/changesetitem.cpp Tue May 24 14:05:35 2011 +0100 @@ -306,27 +306,33 @@ paint->setBrush(Qt::white); if (m_current) { - paint->drawRect(QRectF(x0 - 4, -4, width + 5, height + 8)); + paint->drawRoundedRect(QRectF(x0 - 4, -4, width + 5, height + 8), + 10, 10); } if (m_new) { paint->save(); paint->setPen(Qt::yellow); paint->setBrush(Qt::NoBrush); - paint->drawRect(QRectF(x0 - 2, -2, width + 1, height + 4)); + paint->drawRoundedRect(QRectF(x0 - 2, -2, width + 1, height + 4), + 10, 10); paint->restore(); } } - paint->drawRect(r); - if (!showText) { + paint->drawRoundedRect(r, 7, 7); paint->restore(); return; } - paint->fillRect(QRectF(x0 + 0.5, 0.5, width - 4, fh - 0.5), - QBrush(userColour)); + paint->save(); + paint->setPen(Qt::NoPen); + paint->drawRoundedRect(r, 7, 7); + paint->setBrush(QBrush(userColour)); + paint->drawRoundedRect(QRectF(x0 + 0.5, 0.5, width - 4, fh - 0.5), 7, 7); + paint->drawRect(QRectF(x0 + 0.5, fh/2, width - 4, fh/2)); + paint->restore(); paint->setPen(QPen(Qt::white)); @@ -358,6 +364,10 @@ } } + paint->setPen(QPen(branchColour, 2)); + paint->setBrush(Qt::NoBrush); + paint->drawRoundedRect(r, 7, 7); + if (m_showBranch) { // write branch name paint->save(); diff -r 5cc0d897eb26 -r 7ef46fb73b48 src/uncommitteditem.cpp --- a/src/uncommitteditem.cpp Tue May 24 13:29:27 2011 +0100 +++ b/src/uncommitteditem.cpp Tue May 24 14:05:35 2011 +0100 @@ -137,7 +137,7 @@ int height = 49; QRectF r(x0, 0, width - 3, height); paint->setBrush(Qt::white); - paint->drawRect(r); + paint->drawRoundedRect(r, 7, 7); if (m_wide) { QString label = tr("Uncommitted changes");