From 00dcb777918e1ad4e6f88a52fedaea2e941cd62d Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Tue, 26 Mar 2019 07:43:49 +0100 Subject: [PATCH] Enable blurbehind also for panel controls only if theme sets it Reviewers: #plasma, zzag Reviewed By: #plasma, zzag Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D20057 --- shell/panelconfigview.cpp | 11 +++++------ shell/panelconfigview.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/shell/panelconfigview.cpp b/shell/panelconfigview.cpp index 1aafc88f8..11ba97474 100644 --- a/shell/panelconfigview.cpp +++ b/shell/panelconfigview.cpp @@ -67,9 +67,8 @@ PanelConfigView::PanelConfigView(Plasma::Containment *containment, PanelView *pa KWindowSystem::setState(winId(), NET::KeepAbove); KWindowSystem::forceActiveWindow(winId()); - KWindowEffects::enableBlurBehind(winId(), true); - updateContrast(); - connect(&m_theme, &Plasma::Theme::themeChanged, this, &PanelConfigView::updateContrast); + updateBlurBehindAndContrast(); + connect(&m_theme, &Plasma::Theme::themeChanged, this, &PanelConfigView::updateBlurBehindAndContrast); rootContext()->setContextProperty(QStringLiteral("panel"), panelView); rootContext()->setContextProperty(QStringLiteral("configDialog"), this); @@ -88,8 +87,9 @@ void PanelConfigView::init() syncLocation(); } -void PanelConfigView::updateContrast() +void PanelConfigView::updateBlurBehindAndContrast() { + KWindowEffects::enableBlurBehind(winId(), m_theme.blurBehindEnabled()); KWindowEffects::enableBackgroundContrast(winId(), m_theme.backgroundContrastEnabled(), m_theme.backgroundContrast(), m_theme.backgroundIntensity(), @@ -190,8 +190,7 @@ void PanelConfigView::showEvent(QShowEvent *ev) setFlags(Qt::WindowFlags((flags() | Qt::FramelessWindowHint) & (~Qt::WindowDoesNotAcceptFocus))); KWindowSystem::setState(winId(), NET::KeepAbove); KWindowSystem::forceActiveWindow(winId()); - KWindowEffects::enableBlurBehind(winId(), true); - updateContrast(); + updateBlurBehindAndContrast(); syncGeometry(); syncLocation(); diff --git a/shell/panelconfigview.h b/shell/panelconfigview.h index c1ed93f3e..696cb0a4d 100644 --- a/shell/panelconfigview.h +++ b/shell/panelconfigview.h @@ -79,7 +79,7 @@ protected Q_SLOTS: void syncLocation(); private Q_SLOTS: - void updateContrast(); + void updateBlurBehindAndContrast(); Q_SIGNALS: void visibilityModeChanged();