]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Forgot to adapt to RTL the default category drawer (KCategoryDrawer), since right...
authorRafael Fernández López <ereslibre@kde.org>
Mon, 17 Sep 2007 04:16:29 +0000 (04:16 +0000)
committerRafael Fernández López <ereslibre@kde.org>
Mon, 17 Sep 2007 04:16:29 +0000 (04:16 +0000)
removed from the latter

svn path=/trunk/KDE/kdebase/apps/; revision=713320

src/dolphincategorydrawer.cpp
src/kcategorydrawer.cpp

index 2479f2755044fe2ae277e553509dafb5c5eea077..099167b6158d7e5414994195749bc181d41304e4 100644 (file)
@@ -211,14 +211,12 @@ void DolphinCategoryDrawer::drawCategory(const QModelIndex &index, int sortRole,
                 if (option.direction == Qt::RightToLeft)
                 {
                     starRect.setLeft(starRect.left() + (iconSize / 2) /* separator between stars */);
-                    //starRect.setRight(starRect.right() + (iconSize / 2) /* separator between stars */);
                 }
 
                 starRect.setTop(option.rect.top() + (option.rect.height() / 2) - (iconSize / 4));
                 starRect.setSize(QSize(iconSize / 2, iconSize / 2));
                 painter->drawPixmap(starRect, smallPixmap);
                 starRect.setTop(opt.rect.top() + (option.rect.height() / 2) - (iconSize / 2));
-                //starRect.setSize(QSize(iconSize / 2, iconSize / 2));
 
                 if (option.direction == Qt::LeftToRight)
                 {
index ebe77f4deab5e7bf055984d6c650df1a57d71be5..4c59864a09c3c4c6de615c2f6ffd79fe48430427 100644 (file)
@@ -82,8 +82,10 @@ void KCategoryDrawer::drawCategory(const QModelIndex &index,
 
     QLinearGradient gradient(option.rect.topLeft(),
                              option.rect.bottomRight());
-    gradient.setColorAt(0, color);
-    gradient.setColorAt(1, Qt::transparent);
+    gradient.setColorAt(option.direction == Qt::LeftToRight ? 0
+                                                            : 1, color);
+    gradient.setColorAt(option.direction == Qt::LeftToRight ? 1
+                                                            : 0, Qt::transparent);
 
     painter->setBrush(gradient);
     painter->fillPath(path, gradient);