From: Peter Penz Date: Fri, 21 Sep 2007 19:54:06 +0000 (+0000) Subject: assure that the inactive columns have the same color as the column-view viewport X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/18bdbb7a7e680efd92831f9eee3bc0a508cb7da2?ds=sidebyside assure that the inactive columns have the same color as the column-view viewport svn path=/trunk/KDE/kdebase/apps/; revision=715308 --- diff --git a/src/dolphincolumnview.cpp b/src/dolphincolumnview.cpp index d5e1e47be..bde64371a 100644 --- a/src/dolphincolumnview.cpp +++ b/src/dolphincolumnview.cpp @@ -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()