┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kcategorydrawer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kcategorydrawer.cpp')
-rw-r--r--src/kcategorydrawer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kcategorydrawer.cpp b/src/kcategorydrawer.cpp
index ebe77f4de..4c59864a0 100644
--- a/src/kcategorydrawer.cpp
+++ b/src/kcategorydrawer.cpp
@@ -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);