mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
[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
This commit is contained in:
parent
bf44548ad1
commit
585cc994e6
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue