┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKai Uwe Broulik <[email protected]>2019-02-08 09:01:38 +0100
committerKai Uwe Broulik <[email protected]>2019-02-08 09:01:38 +0100
commit585cc994e6c5d03d276cd06e93dd808cf0efac92 (patch)
treec3a57133f5e8ca9e04d12a0efd0898daf06365f8 /src
parentbf44548ad15437df3138e654636639046d8fa127 (diff)
[DolphinView] Use correct color group
Use the inactive color group when the window is inactive and update when window state changes. CCBUG: 404053 Differential Revision: https://phabricator.kde.org/D18811
Diffstat (limited to 'src')
-rw-r--r--src/views/dolphinview.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index d64ae8622..b8c2f3d01 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -711,7 +711,7 @@ void DolphinView::stopLoading()
void DolphinView::updatePalette()
{
- QColor color = KColorScheme(QPalette::Active, KColorScheme::View).background().color();
+ QColor color = KColorScheme(isActiveWindow() ? QPalette::Active : QPalette::Inactive, KColorScheme::View).background().color();
if (!m_active) {
color.setAlpha(150);
}
@@ -740,6 +740,11 @@ bool DolphinView::eventFilter(QObject* watched, QEvent* event)
QPixmapCache::clear();
break;
+ case QEvent::WindowActivate:
+ case QEvent::WindowDeactivate:
+ updatePalette();
+ break;
+
case QEvent::KeyPress:
if (GeneralSettings::useTabForSwitchingSplitView()) {
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);