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
parent 1ca9f55f
......@@ -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();
......
......@@ -79,7 +79,7 @@ protected Q_SLOTS:
void syncLocation();
private Q_SLOTS:
void updateContrast();
void updateBlurBehindAndContrast();
Q_SIGNALS:
void visibilityModeChanged();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment