diff options
| author | Peter Penz <[email protected]> | 2007-08-12 17:48:29 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-08-12 17:48:29 +0000 |
| commit | c349180c08418460a81a261f42df0434e0d18f78 (patch) | |
| tree | 50f1039a9545b104ab186d9c0d79f4717a52ce89 /src/dolphinview.cpp | |
| parent | 2c9a50957025a4932f0a9a7b54131fcdd9dffdc4 (diff) | |
* fixed issue that when having a split view, that both views get the same color after OK or Apply has been pressed inside the Dolphin settings dialog
* prepare for toggling the view icon depending from the activation state
svn path=/trunk/KDE/kdebase/apps/; revision=699311
Diffstat (limited to 'src/dolphinview.cpp')
| -rw-r--r-- | src/dolphinview.cpp | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index a9f160d00..197b4d8f9 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -134,19 +134,7 @@ void DolphinView::setActive(bool active) m_active = active; - QColor color = KColorScheme(KColorScheme::View).background(); - if (active) { - emit urlChanged(url()); - emit selectionChanged(selectedItems()); - } else { - color.setAlpha(0); - } - - QWidget* viewport = itemView()->viewport(); - QPalette palette; - palette.setColor(viewport->backgroundRole(), color); - viewport->setPalette(palette); - + updateViewportColor(); update(); if (active) { @@ -438,6 +426,7 @@ void DolphinView::refresh() createView(); applyViewProperties(m_controller->url()); reload(); + updateViewportColor(); } void DolphinView::setUrl(const KUrl& url) @@ -964,4 +953,20 @@ void DolphinView::applyCutItemEffect() } } +void DolphinView::updateViewportColor() +{ + QColor color = KColorScheme(KColorScheme::View).background(); + if (m_active) { + emit urlChanged(url()); + emit selectionChanged(selectedItems()); + } else { + color.setAlpha(0); + } + + QWidget* viewport = itemView()->viewport(); + QPalette palette; + palette.setColor(viewport->backgroundRole(), color); + viewport->setPalette(palette); +} + #include "dolphinview.moc" |
