[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/extragear/kde3/graphics/digikam/digikam
From:       Gilles Caulier <caulier.gilles () gmail ! com>
Date:       2008-01-21 20:44:52
Message-ID: 1200948292.973572.12464.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 764459 by cgilles:

polish


 M  +19 -0     timelinewidget.cpp  


--- branches/extragear/kde3/graphics/digikam/digikam/timelinewidget.cpp #764458:764459
@@ -591,6 +591,7 @@
     SelectionMode sel;
     QRect         focusRect, selRect, barRect;
     QBrush        selBrush;
+    QColor        dateColor;
 
     // Date histogram drawing is divided in 2 parts. The current date-time 
     // is placed on the center of the view and all dates on right are computed,
@@ -628,6 +629,11 @@
         if (ref == d->cursorDateTime)
             focusRect = barRect;
 
+        if (ref > d->maxDateTime)
+            dateColor = palette().active().mid();
+        else 
+            dateColor = palette().active().foreground(); 
+
         p.setPen(palette().active().foreground());
         p.fillRect(barRect, QBrush(Qt::green));
         p.drawRect(barRect);
@@ -667,6 +673,7 @@
 
                 if (KGlobal::locale()->calendar()->dayOfWeek(ref.date()) == 1)
                 {
+                    p.setPen(dateColor);
                     p.drawLine(barRect.left(), barRect.bottom(), 
                                barRect.left(), barRect.bottom()+d->bottomMargin/2);
                     QString txt = KGlobal::locale()->formatDate(ref.date(), true);
@@ -691,6 +698,7 @@
                     p.restore();
                 }
 
+                p.setPen(dateColor);
                 if (week == 1 || week == 10 || week == 20 || week == 30 || week == 40 || week == 50)
                 {
                     p.drawLine(barRect.left(), barRect.bottom(), 
@@ -722,6 +730,7 @@
                     p.restore();
                 }
 
+                p.setPen(dateColor);
                 if (ref.date().month() == 1)
                 {
                     p.drawLine(barRect.left(), barRect.bottom(), 
@@ -739,6 +748,7 @@
             }
             case Year:
             {
+                p.setPen(dateColor);
                 if (ref.date().year() % 10 == 0)
                 {
                     p.drawLine(barRect.left(), barRect.bottom(), 
@@ -793,6 +803,11 @@
         if (ref == d->cursorDateTime)
             focusRect = barRect;
 
+        if (ref < d->minDateTime)
+            dateColor = palette().active().mid();
+        else 
+            dateColor = palette().active().foreground(); 
+
         p.setPen(palette().active().foreground());
         p.fillRect(barRect, QBrush(Qt::green));
         p.drawRect(barRect);
@@ -832,6 +847,7 @@
 
                 if (KGlobal::locale()->calendar()->dayOfWeek(ref.date()) == 1)
                 {
+                    p.setPen(dateColor);
                     p.drawLine(barRect.left(), barRect.bottom(),
                                barRect.left(), barRect.bottom()+d->bottomMargin/2);
                     QString txt = KGlobal::locale()->formatDate(ref.date(), true);
@@ -856,6 +872,7 @@
                     p.restore();
                 }
 
+                p.setPen(dateColor);
                 if (week == 1 || week == 10 || week == 20 || week == 30 || week == 40 || week == 50)
                 {
                     p.drawLine(barRect.left(), barRect.bottom(), 
@@ -887,6 +904,7 @@
                     p.restore();
                 }
 
+                p.setPen(dateColor);
                 if (ref.date().month() == 1)
                 {
                     p.drawLine(barRect.left(), barRect.bottom(), 
@@ -904,6 +922,7 @@
             }
             case Year:
             {
+                p.setPen(dateColor);
                 if (ref.date().year() % 10 == 0)
                 {
                     p.drawLine(barRect.left(), barRect.bottom(), 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic