]> cloud.milkyroute.net Git - dolphin.git/commitdiff
assure that the inactive columns have the same color as the column-view viewport
authorPeter Penz <peter.penz19@gmail.com>
Fri, 21 Sep 2007 19:54:06 +0000 (19:54 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Fri, 21 Sep 2007 19:54:06 +0000 (19:54 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=715308

src/dolphincolumnview.cpp

index d5e1e47be0df3c2cb06d640bef17d18b3b5d0241..bde64371ac3f6b2f79e4410b458be4b86af32e5a 100644 (file)
@@ -366,16 +366,10 @@ void ColumnWidget::deactivate()
                    m_view, SLOT(triggerItem(const QModelIndex&)));
     }
 
-    QColor bgColor = KColorScheme(QPalette::Active, KColorScheme::View).background().color();
-    const QColor fgColor = KColorScheme(QPalette::Active, KColorScheme::View).foreground().color();
-    bgColor = KColorUtils::mix(bgColor, fgColor, 0.04);
-
-    QPalette palette = viewport()->palette();
-    palette.setColor(viewport()->backgroundRole(), bgColor);
+    const QPalette palette = m_view->viewport()->palette();
     viewport()->setPalette(palette);
 
     selectionModel()->clear();
-
     update();
 }
 
@@ -421,6 +415,15 @@ DolphinColumnView::DolphinColumnView(QWidget* parent, DolphinController* control
 
     m_animation = new QTimeLine(500, this);
     connect(m_animation, SIGNAL(frameChanged(int)), horizontalScrollBar(), SLOT(setValue(int)));
+
+    // dim the background of the viewport
+    QColor bgColor = KColorScheme(QPalette::Active, KColorScheme::View).background().color();
+    const QColor fgColor = KColorScheme(QPalette::Active, KColorScheme::View).foreground().color();
+    bgColor = KColorUtils::mix(bgColor, fgColor, 0.04);
+
+    QPalette palette = viewport()->palette();
+    palette.setColor(viewport()->backgroundRole(), bgColor);
+    viewport()->setPalette(palette);
 }
 
 DolphinColumnView::~DolphinColumnView()