Change the background color

This commit is contained in:
Antonis Tsiapaliokas 2013-09-13 15:29:53 +03:00 committed by Martin Gräßlin
parent de7b09b011
commit 99dc27e896
3 changed files with 6 additions and 1 deletions

View file

@ -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));
}

View file

@ -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(); };
};

View file

@ -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 {