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

List:       kde-commits
Subject:    KDE/kdelibs/plasma
From:       Jesse Lee Zamora <xtremek2008 () aim ! com>
Date:       2008-12-01 1:14:37
Message-ID: 1228094077.326814.8415.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 891038 by jzamora:

Before if the background of the delegate is not white, the gradient would paint 
white, and look terrible. So, this fixes that by checking the background color and 
making the gradient that color.



 M  +4 -2      delegate.cpp  


--- trunk/KDE/kdelibs/plasma/delegate.cpp #891037:891038
@@ -297,6 +297,8 @@
 
     painter->save();
     painter->setPen(Qt::NoPen);
+    const QColor gradientColor = 
+	KColorScheme(QPalette::Active).background(KColorScheme::NormalBackground).color();
     if (option.direction == Qt::LeftToRight) {
         if ((titleRect.width() + 20) > option.rect.width() ||
             (subTitleRect.width() + 20) > option.rect.width()) {
@@ -307,7 +309,7 @@
             gr.setStart(gradientRect.topLeft());
             gr.setFinalStop(gradientRect.topRight());
             gr.setColorAt(0.0, Qt::transparent);
-            gr.setColorAt(0.7, Qt::white);
+            gr.setColorAt(0.7, gradientColor);
             painter->setBrush(QBrush(gr));
             painter->drawRect(gradientRect);
         }
@@ -321,7 +323,7 @@
             gr.setStart(gradientRect.topRight());
             gr.setFinalStop(gradientRect.topLeft());
             gr.setColorAt(0.0, Qt::transparent);
-            gr.setColorAt(0.6, Qt::white);
+            gr.setColorAt(0.6, gradientColor);
             painter->setBrush(QBrush(gr));
             painter->drawRect(gradientRect);
         }
[prev in list] [next in list] [prev in thread] [next in thread] 

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