diff options
| author | Peter Penz <[email protected]> | 2007-09-21 19:54:06 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-09-21 19:54:06 +0000 |
| commit | 18bdbb7a7e680efd92831f9eee3bc0a508cb7da2 (patch) | |
| tree | d4ec9985a6751669c62a996dd89b8a186ee011cf /src/dolphincolumnview.cpp | |
| parent | bcbf0b44d62691f9bbbe8db8b0d006a5c996ed60 (diff) | |
assure that the inactive columns have the same color as the column-view viewport
svn path=/trunk/KDE/kdebase/apps/; revision=715308
Diffstat (limited to 'src/dolphincolumnview.cpp')
| -rw-r--r-- | src/dolphincolumnview.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
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() |
