changeset 393:0c826f07929f item_appearance_adjustments

Show whole of "new" item in yellow, not just border -- and omit yellow border except for current item
author Chris Cannam
date Tue, 24 May 2011 17:46:59 +0100
parents cf18694f64a3
children 27757ce9c76c
files src/changesetitem.cpp
diffstat 1 files changed, 25 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/changesetitem.cpp	Tue May 24 17:39:42 2011 +0100
+++ b/src/changesetitem.cpp	Tue May 24 17:46:59 2011 +0100
@@ -324,20 +324,23 @@
 
     if (showProperLines) {
 
-        paint->setBrush(Qt::white);
+        if (m_new) {
+            paint->setBrush(QColor(255, 255, 156));
+        } else {
+            paint->setBrush(Qt::white);
+        }            
 
         if (m_current) {
             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->drawRoundedRect(QRectF(x0 - 2, -2, width + 1, height + 4),
-                                   10, 10);
-            paint->restore();
+            if (m_new) {
+                paint->save();
+                paint->setPen(Qt::yellow);
+                paint->setBrush(Qt::NoBrush);
+                paint->drawRoundedRect(QRectF(x0 - 2, -2, width + 1, height + 4),
+                                       10, 10);
+                paint->restore();
+            }
         }
     }
 
@@ -455,20 +458,24 @@
     int size = fh * 2;
     int x0 = -size/2 + 25;
 
-    paint->setBrush(Qt::white);
+    if (m_new) {
+        paint->setBrush(QColor(255, 255, 156));
+    } else {
+        paint->setBrush(Qt::white);
+    }
 
     if (showProperLines) {
 
         if (m_current) {
             paint->drawEllipse(QRectF(x0 - 4, fh - 4, size + 8, size + 8));
-        }
 
-        if (m_new) {
-            paint->save();
-            paint->setPen(Qt::yellow);
-            paint->setBrush(Qt::NoBrush);
-            paint->drawEllipse(QRectF(x0 - 2, fh - 2, size + 4, size + 4));
-            paint->restore();
+            if (m_new) {
+                paint->save();
+                paint->setPen(Qt::yellow);
+                paint->setBrush(Qt::NoBrush);
+                paint->drawEllipse(QRectF(x0 - 2, fh - 2, size + 4, size + 4));
+                paint->restore();
+            }
         }
     }