diff options
| author | Peter Penz <[email protected]> | 2008-01-10 18:24:57 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-01-10 18:24:57 +0000 |
| commit | fd1c05b141264cb4500f32cb343ecacb3d5a662f (patch) | |
| tree | efadf87879f96df58a2ef777df682b07c8d788b3 /src/dolphincolumnwidget.cpp | |
| parent | f2bf4eafc0aad961e37755f6b116ba7fb5593691 (diff) | |
fixed HIG color violations
BUG: 153363
svn path=/trunk/KDE/kdebase/apps/; revision=759482
Diffstat (limited to 'src/dolphincolumnwidget.cpp')
| -rw-r--r-- | src/dolphincolumnwidget.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/dolphincolumnwidget.cpp b/src/dolphincolumnwidget.cpp index 195d0fc01..002c2cf28 100644 --- a/src/dolphincolumnwidget.cpp +++ b/src/dolphincolumnwidget.cpp @@ -184,12 +184,16 @@ void DolphinColumnWidget::setShowPreview(bool show) void DolphinColumnWidget::updateBackground() { - QColor color = KColorScheme(QPalette::Active, KColorScheme::View).background().color(); - if (!m_active || !m_view->m_active) { - color.setAlpha(150); - } + // TODO: The alpha-value 150 is copied from DolphinView::setActive(). When + // cleaning up the cut-indication of DolphinColumnWidget with the code from + // DolphinView a common helper-class should be available which can be shared + // by all view implementations -> no hardcoded value anymore + const QPalette::ColorRole role = viewport()->backgroundRole(); + QColor color = viewport()->palette().color(role); + color.setAlpha((m_active && m_view->m_active) ? 255 : 150); + QPalette palette = viewport()->palette(); - palette.setColor(viewport()->backgroundRole(), color); + palette.setColor(role, color); viewport()->setPalette(palette); update(); |
