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

List:       kde-commits
Subject:    koffice/krita/ui
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2010-11-20 11:36:35
Message-ID: 20101120113635.28A50AC8A0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1199022 by rempt:

Do not use the deprecated KCategoryDrawer

(Though it's a mystery why it's deprecated.)

 M  +10 -4     kis_categorized_item_delegate.cpp  


--- trunk/koffice/krita/ui/kis_categorized_item_delegate.cpp #1199021:1199022
@@ -18,14 +18,20 @@
 
 #include "kis_categorized_item_delegate.h"
 
-#include <KCategoryDrawer>
+#include <kcategorydrawer.h>
 #include <KCategorizedSortFilterProxyModel>
 #include <QPainter>
 #include <QApplication>
 
-class KisCategoryDrawer : public KCategoryDrawer
+class KisCategoryDrawer : public KCategoryDrawerV3
 {
 public:
+
+    KisCategoryDrawer(KCategorizedView *view = 0)
+        : KCategoryDrawerV3(view)
+    {
+    }
+
     virtual void drawCategory ( const QModelIndex& index, int /*sortRole*/, const \
QStyleOption& option, QPainter* painter ) const  {
         painter->setRenderHint(QPainter::Antialiasing);
@@ -35,8 +41,8 @@
         if (index.row() != 0) {
             gradient.setColorAt(0, Qt::transparent);
         }
-        gradient.setColorAt(0.3, option.palette.background());
-        gradient.setColorAt(0.8, option.palette.background());
+        gradient.setColorAt(0.3, option.palette.background().color());
+        gradient.setColorAt(0.8, option.palette.background().color());
         gradient.setColorAt(1, Qt::transparent);
         painter->fillRect(option.rect, gradient);
 


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

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