diff src/changesetitem.cpp @ 386:7ef46fb73b48 item_appearance_adjustments

Use rounded rectangles throughout
author Chris Cannam
date Tue, 24 May 2011 14:05:35 +0100
parents b9c153e00e84
children ce6a70970808
line wrap: on
line diff
--- 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();