mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-02 15:55:39 +00:00
Fix Material theme
This commit is contained in:
parent
c35d07c961
commit
98b76d3203
@ -1,4 +1,4 @@
|
|||||||
QT += core quick network
|
QT += core quick network quickcontrols2
|
||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
|
|
||||||
TARGET = moonlight-qt
|
TARGET = moonlight-qt
|
||||||
|
@ -2,12 +2,16 @@ import QtQuick 2.9
|
|||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
|
import QtQuick.Controls.Material 2.1
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: window
|
id: window
|
||||||
visible: true
|
visible: true
|
||||||
width: 1280
|
width: 1280
|
||||||
height: 600
|
height: 600
|
||||||
color: "#333333"
|
|
||||||
|
Material.theme: Material.Dark
|
||||||
|
Material.accent: Material.Purple
|
||||||
|
|
||||||
StackView {
|
StackView {
|
||||||
id: stackView
|
id: stackView
|
||||||
|
@ -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
|
|
@ -1,6 +1,7 @@
|
|||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include <QQmlApplicationEngine>
|
#include <QQmlApplicationEngine>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
#include <QQuickStyle>
|
||||||
|
|
||||||
// Don't let SDL hook our main function, since Qt is already
|
// Don't let SDL hook our main function, since Qt is already
|
||||||
// doing the same thing. This needs to be before any headers
|
// doing the same thing. This needs to be before any headers
|
||||||
@ -45,6 +46,8 @@ int main(int argc, char *argv[])
|
|||||||
return new ComputerManager();
|
return new ComputerManager();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QQuickStyle::setStyle("Material");
|
||||||
|
|
||||||
// Load the main.qml file
|
// Load the main.qml file
|
||||||
QQmlApplicationEngine engine;
|
QQmlApplicationEngine engine;
|
||||||
engine.load(QUrl(QStringLiteral("qrc:/gui/main.qml")));
|
engine.load(QUrl(QStringLiteral("qrc:/gui/main.qml")));
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>gui/main.qml</file>
|
<file>gui/main.qml</file>
|
||||||
<file>gui/qtquickcontrols2.conf</file>
|
|
||||||
<file>gui/PcView.qml</file>
|
<file>gui/PcView.qml</file>
|
||||||
<file>gui/ic_tv_white_48px.svg</file>
|
<file>gui/ic_tv_white_48px.svg</file>
|
||||||
<file>gui/ic_add_to_queue_white_48px.svg</file>
|
<file>gui/ic_add_to_queue_white_48px.svg</file>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user