┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-09-22 15:11:50 +0000
committerPeter Penz <[email protected]>2008-09-22 15:11:50 +0000
commitb3fa99a39c26445f4846e1d6d321186bb09b0689 (patch)
tree1cee5b505c57440ecc48aca6543cd2f537873091
parenta2e045a567f1387997c89b7f130cd742786d7fd4 (diff)
make the background transparent and apply the window-text color to the text color, so that enough contrast is given for all color schemes
CCMAIL: [email protected] svn path=/trunk/KDE/kdebase/apps/; revision=863584
-rw-r--r--src/sidebartreeview.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/sidebartreeview.cpp b/src/sidebartreeview.cpp
index 3018737ab..0b18c260a 100644
--- a/src/sidebartreeview.cpp
+++ b/src/sidebartreeview.cpp
@@ -46,9 +46,15 @@ SidebarTreeView::SidebarTreeView(QWidget* parent) :
viewport()->setAttribute(Qt::WA_Hover);
- QPalette palette = viewport()->palette();
- palette.setColor(viewport()->backgroundRole(), Qt::transparent);
- viewport()->setPalette(palette);
+ // make the background transparent and apply the window-text color
+ // to the text color, so that enough contrast is given for all color
+ // schemes
+ QPalette p = palette();
+ p.setColor(QPalette::Active, QPalette::Text, p.color(QPalette::Active, QPalette::WindowText));
+ p.setColor(QPalette::Inactive, QPalette::Text, p.color(QPalette::Inactive, QPalette::WindowText));
+ p.setColor(QPalette::Disabled, QPalette::Text, p.color(QPalette::Disabled, QPalette::WindowText));
+ setPalette(p);
+ viewport()->setAutoFillBackground(false);
KFileItemDelegate* delegate = new KFileItemDelegate(this);
setItemDelegate(delegate);