Change the background color
This commit is contained in:
parent
de7b09b011
commit
99dc27e896
3 changed files with 6 additions and 1 deletions
|
@ -369,6 +369,7 @@ void EffectView::init()
|
|||
{
|
||||
QString mainFile = QStandardPaths::locate(QStandardPaths::DataLocation, "qml/main.qml", QStandardPaths::LocateFile);
|
||||
setResizeMode(QQuickView::SizeRootObjectToView);
|
||||
rootContext()->setContextProperty("engine", this);
|
||||
setSource(QUrl(mainFile));
|
||||
}
|
||||
|
||||
|
|
|
@ -100,6 +100,9 @@ class EffectView : public QQuickView
|
|||
public:
|
||||
EffectView(QWindow *parent = 0);
|
||||
void init();
|
||||
|
||||
Q_INVOKABLE QColor backgroundViewColor() { return KColorScheme(QPalette::Active, KColorScheme::Window, KSharedConfigPtr(0)).background(KColorScheme::NormalBackground).color(); };
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -24,10 +24,11 @@ import QtQuick.Layouts 1.0
|
|||
import org.kde.kwin.kwincompositing 1.0
|
||||
|
||||
|
||||
Item {
|
||||
Rectangle {
|
||||
id: window
|
||||
width: 780
|
||||
height: 480
|
||||
color: engine.backgroundViewColor()
|
||||
property bool openGLBrokeState: true
|
||||
|
||||
Item {
|
||||
|
|
Loading…
Reference in a new issue