diff --git a/app/app.pro b/app/app.pro index 4f1a71b0..4273a3f5 100644 --- a/app/app.pro +++ b/app/app.pro @@ -1,4 +1,4 @@ -QT += core quick network +QT += core quick network quickcontrols2 CONFIG += c++11 TARGET = moonlight-qt diff --git a/app/gui/main.qml b/app/gui/main.qml index da7050c2..dc0b353e 100644 --- a/app/gui/main.qml +++ b/app/gui/main.qml @@ -2,12 +2,16 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.3 +import QtQuick.Controls.Material 2.1 + ApplicationWindow { id: window visible: true width: 1280 height: 600 - color: "#333333" + + Material.theme: Material.Dark + Material.accent: Material.Purple StackView { id: stackView diff --git a/app/gui/qtquickcontrols2.conf b/app/gui/qtquickcontrols2.conf deleted file mode 100644 index 535b22ca..00000000 --- a/app/gui/qtquickcontrols2.conf +++ /dev/null @@ -1,6 +0,0 @@ -; This file can be edited to change the style of the application -; Read "Qt Quick Controls 2 Configuration File" for details: -; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html - -[Controls] -Style=Material diff --git a/app/main.cpp b/app/main.cpp index 0191d5ca..32a0f469 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -1,6 +1,7 @@ #include #include #include +#include // Don't let SDL hook our main function, since Qt is already // doing the same thing. This needs to be before any headers @@ -45,6 +46,8 @@ int main(int argc, char *argv[]) return new ComputerManager(); }); + QQuickStyle::setStyle("Material"); + // Load the main.qml file QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/gui/main.qml"))); diff --git a/app/qml.qrc b/app/qml.qrc index dbbd4db0..f89cf0ba 100644 --- a/app/qml.qrc +++ b/app/qml.qrc @@ -1,7 +1,6 @@ gui/main.qml - gui/qtquickcontrols2.conf gui/PcView.qml gui/ic_tv_white_48px.svg gui/ic_add_to_queue_white_48px.svg