Fix Material theme

This commit is contained in:
Cameron Gutman 2018-07-08 23:24:26 -07:00
parent c35d07c961
commit 98b76d3203
5 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
QT += core quick network
QT += core quick network quickcontrols2
CONFIG += c++11
TARGET = moonlight-qt

View File

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

View File

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

View File

@ -1,6 +1,7 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QIcon>
#include <QQuickStyle>
// 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")));

View File

@ -1,7 +1,6 @@
<RCC>
<qresource prefix="/">
<file>gui/main.qml</file>
<file>gui/qtquickcontrols2.conf</file>
<file>gui/PcView.qml</file>
<file>gui/ic_tv_white_48px.svg</file>
<file>gui/ic_add_to_queue_white_48px.svg</file>