use the new backgroundcontrast effect
This commit is contained in:
parent
188e421956
commit
e0676f7501
@ -354,6 +354,11 @@ void DialogProxy::syncMainItemToSize()
|
||||
m_frameSvgItem->setWidth(width());
|
||||
m_frameSvgItem->setHeight(height());
|
||||
KWindowEffects::enableBlurBehind(winId(), true, m_frameSvgItem->frameSvg()->mask());
|
||||
if (qGray(m_theme.color(Plasma::Theme::BackgroundColor).rgb()) > 127) {
|
||||
KWindowEffects::enableBackgroundContrast(winId(), true, 0.30, 1.9, 1.7, m_frameSvgItem->frameSvg()->mask());
|
||||
} else {
|
||||
KWindowEffects::enableBackgroundContrast(winId(), true, 0.45, 0.45, 1.7, m_frameSvgItem->frameSvg()->mask());
|
||||
}
|
||||
|
||||
if (m_mainItem) {
|
||||
m_mainItem.data()->setX(m_frameSvgItem->margins()->left());
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <QPoint>
|
||||
|
||||
#include <Plasma/Plasma>
|
||||
#include <Plasma/Theme>
|
||||
|
||||
#include <netwm_def.h>
|
||||
|
||||
@ -175,6 +176,7 @@ private:
|
||||
WindowType m_type;
|
||||
bool m_hideOnWindowDeactivate;
|
||||
bool m_outputOnly;
|
||||
Plasma::Theme m_theme;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -46,6 +46,11 @@ PanelConfigView::PanelConfigView(Plasma::Containment *containment, PanelView *pa
|
||||
setFlags(Qt::FramelessWindowHint);
|
||||
|
||||
KWindowEffects::enableBlurBehind(winId(), true);
|
||||
if (qGray(m_theme.color(Plasma::Theme::BackgroundColor).rgb()) > 127) {
|
||||
KWindowEffects::enableBackgroundContrast(winId(), true, 0.30, 1.9, 1.7);
|
||||
} else {
|
||||
KWindowEffects::enableBackgroundContrast(winId(), true, 0.45, 0.45, 1.7);
|
||||
}
|
||||
|
||||
engine()->rootContext()->setContextProperty("panel", panelView);
|
||||
engine()->rootContext()->setContextProperty("configDialog", this);
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <QJSValue>
|
||||
#include <QQmlListProperty>
|
||||
#include <QStandardItemModel>
|
||||
#include <Plasma/Theme>
|
||||
|
||||
class AppletInterface;
|
||||
class ConfigPropertyMap;
|
||||
@ -55,6 +56,7 @@ protected Q_SLOTS:
|
||||
private:
|
||||
Plasma::Containment *m_containment;
|
||||
PanelView *m_panelView;
|
||||
Plasma::Theme m_theme;
|
||||
};
|
||||
|
||||
#endif // multiple inclusion guard
|
||||
|
@ -57,6 +57,11 @@ PanelView::PanelView(ShellCorona *corona, QWindow *parent)
|
||||
|
||||
//TODO: how to take the shape from the framesvg?
|
||||
KWindowEffects::enableBlurBehind(winId(), true);
|
||||
if (qGray(m_theme.color(Plasma::Theme::BackgroundColor).rgb()) > 127) {
|
||||
KWindowEffects::enableBackgroundContrast(winId(), true, 0.30, 1.9, 1.7);
|
||||
} else {
|
||||
KWindowEffects::enableBackgroundContrast(winId(), true, 0.45, 0.45, 1.7);
|
||||
}
|
||||
|
||||
//Screen management
|
||||
connect(this, &QWindow::screenChanged,
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <plasmaquickview.h>
|
||||
#include "panelconfigview.h"
|
||||
#include <QtCore/qpointer.h>
|
||||
#include <Plasma/Theme>
|
||||
|
||||
class ShellCorona;
|
||||
|
||||
@ -108,6 +109,7 @@ private:
|
||||
ShellCorona *m_corona;
|
||||
QTimer *m_strutsTimer;
|
||||
VisibilityMode m_visibilityMode;
|
||||
Plasma::Theme m_theme;
|
||||
|
||||
static const int STRUTSTIMERDELAY = 200;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user