mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-18 08:22:33 +02:00
Merge branch '37-support-system-wide-dark-mode' into 'master'
Resolve "Support system wide dark mode" Closes #37 See merge request kelteseth/ScreenPlay!31
This commit is contained in:
commit
c7106a85cd
@ -1 +1 @@
|
||||
Subproject commit 4427e3b03e1fc4442ac539e4165d4855716f1d3b
|
||||
Subproject commit 9523fa141f98da6587a9da90df8917f55a90d220
|
@ -1 +1 @@
|
||||
Subproject commit e7e871512a18d227652a5dd825415e3b59a01de0
|
||||
Subproject commit 31863079c3b7d1af8f7bdbb23c4e31fd2956e6ad
|
1
Common/stomt-qt-sdk
Submodule
1
Common/stomt-qt-sdk
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit c66dd97ccfb9f67e64b57d372b8017bbe1ea25f9
|
@ -4,7 +4,13 @@
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
// Buggy with every Qt version except 5.14.0!
|
||||
// Displays wrong DPI scaled monitor resolution
|
||||
// 4k with 150% scaling to FULL HD on Windows
|
||||
// https://bugreports.qt.io/browse/QTBUG-81694
|
||||
#if defined(Q_OS_LINUX) || defined(Q_OS_OSX)
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
#endif
|
||||
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
||||
|
||||
QApplication qtGuiApp(argc, argv);
|
||||
|
@ -1,11 +1,13 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.2
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt.labs.platform 1.0
|
||||
|
||||
import ScreenPlay 1.0
|
||||
import Settings 1.0
|
||||
|
||||
import "qml/"
|
||||
import "qml/Monitors"
|
||||
@ -16,7 +18,15 @@ import "qml/Workshop"
|
||||
|
||||
ApplicationWindow {
|
||||
id: window
|
||||
color: "#eeeeee"
|
||||
color: {
|
||||
if(Material.theme === Material.Dark){
|
||||
return Qt.darker(Material.background)
|
||||
} else {
|
||||
return Material.background
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Set visible if the -silent parameter was not set (see app.cpp end of constructor).
|
||||
visible: false
|
||||
width: 1400
|
||||
@ -30,7 +40,34 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Material.accent: {
|
||||
return Material.color(Material.Orange)
|
||||
}
|
||||
|
||||
function setTheme(theme){
|
||||
switch (theme) {
|
||||
case Settings.System:
|
||||
window.Material.theme = Material.System
|
||||
break
|
||||
case Settings.Dark:
|
||||
window.Material.theme = Material.Dark
|
||||
break
|
||||
case Settings.Light:
|
||||
window.Material.theme = Material.Light
|
||||
break
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: ScreenPlay.settings
|
||||
function onThemeChanged(theme) {
|
||||
setTheme(theme)
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
setTheme(ScreenPlay.settings.theme)
|
||||
|
||||
if (!ScreenPlay.settings.silentStart) {
|
||||
window.show()
|
||||
ScreenPlay.setTrackerSendEvent("navigation", "Installed")
|
||||
@ -75,6 +112,7 @@ ApplicationWindow {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
|
||||
Connections {
|
||||
target: ScreenPlay.util
|
||||
function onRequestNavigation(nav) {
|
||||
|
@ -1,11 +1,13 @@
|
||||
import QtQuick 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls.Material 2.12
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
color: "gray"
|
||||
width: 32
|
||||
height: 32
|
||||
color: Material.background
|
||||
width: 42
|
||||
height: width
|
||||
radius: width
|
||||
|
||||
property alias iconSource: icon.source
|
||||
property string url
|
||||
@ -13,9 +15,10 @@ Rectangle {
|
||||
|
||||
Image {
|
||||
id: icon
|
||||
sourceSize: Qt.size(32, 32)
|
||||
sourceSize: Qt.size(28, 28)
|
||||
anchors.centerIn: parent
|
||||
visible: false
|
||||
smooth: true
|
||||
source: "qrc:/assets/icons/icon_info.svg"
|
||||
}
|
||||
|
||||
@ -23,7 +26,7 @@ Rectangle {
|
||||
id: overlay
|
||||
anchors.fill: icon
|
||||
source: icon
|
||||
color: "orange"
|
||||
color: Material.accent
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
@ -40,9 +43,9 @@ Rectangle {
|
||||
name: "hover"
|
||||
PropertyChanges {
|
||||
target: icon
|
||||
width:40
|
||||
height:40
|
||||
sourceSize: Qt.size(40,40)
|
||||
width: 34
|
||||
height: 34
|
||||
sourceSize: Qt.size(34,34)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -45,7 +45,7 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
id: rectangle
|
||||
color: "#F0F0F0"
|
||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(Material.background)
|
||||
radius: 3
|
||||
clip: true
|
||||
anchors {
|
||||
@ -137,9 +137,9 @@ Item {
|
||||
Button {
|
||||
id: btnClear
|
||||
text: qsTr("Clear")
|
||||
Material.background: Material.Grey
|
||||
Material.background: Material.theme === Material.Light ? Qt.lighter(Material.accent) : Qt.darker(Material.accent)
|
||||
Material.foreground: "white"
|
||||
font.family: ScreenPlay.settings.font
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: btnOpen.left
|
||||
@ -152,7 +152,7 @@ Item {
|
||||
Button {
|
||||
id: btnOpen
|
||||
text: qsTr("Select Preview Image")
|
||||
Material.background: Material.Orange
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
font.family: ScreenPlay.settings.font
|
||||
anchors {
|
||||
|
@ -6,13 +6,14 @@
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls.Material 2.12
|
||||
|
||||
Item {
|
||||
id: control
|
||||
anchors.fill: parent
|
||||
|
||||
property alias radius: mask.radius
|
||||
property color color: "orange"
|
||||
property color color: Material.accent
|
||||
property var target
|
||||
property int duration: 600
|
||||
|
||||
|
@ -15,13 +15,14 @@ Item {
|
||||
Rectangle {
|
||||
id: rectangle
|
||||
radius: 3
|
||||
|
||||
color: Material.theme === Material.Light ? Qt.lighter(Material.background) : Material.background
|
||||
anchors.fill: parent
|
||||
|
||||
Text {
|
||||
id: txt
|
||||
text: _name
|
||||
color: Material.color(Material.Grey)
|
||||
color: Material.theme === Material.Light ? Qt.lighter(Material.foreground) : Qt.darker(Material.foreground)
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
anchors.fill: parent
|
||||
|
@ -26,7 +26,7 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
id: rectangle
|
||||
color: "#F0F0F0"
|
||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(Material.background)
|
||||
radius: 3
|
||||
clip: true
|
||||
anchors {
|
||||
@ -72,7 +72,7 @@ Item {
|
||||
radius: 3
|
||||
height: parent.height - 20
|
||||
width: 200
|
||||
color: "#aaffffff"
|
||||
color: Material.theme === Material.Light ? Qt.lighter(Material.background) : Material.background
|
||||
anchors {
|
||||
top: parent.top
|
||||
topMargin: -80
|
||||
|
@ -108,7 +108,7 @@ Item {
|
||||
bottomMargin: 30
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
Material.background: Material.Orange
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
|
||||
icon.source: "qrc:/assets/icons/icon_share.svg"
|
||||
|
@ -77,7 +77,7 @@ Item {
|
||||
ImageParticle {
|
||||
height: 16
|
||||
width: 16
|
||||
color: "orange"
|
||||
color: Material.accent
|
||||
source: "qrc:/assets/particle/dot.png"
|
||||
system: particleSystem
|
||||
opacity: .75
|
||||
|
@ -1,5 +1,6 @@
|
||||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import ScreenPlay 1.0
|
||||
|
||||
@ -39,6 +40,7 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
id: bg
|
||||
color: Material.background
|
||||
height: parent.height - 10
|
||||
anchors {
|
||||
top: parent.top
|
||||
@ -74,7 +76,7 @@ Item {
|
||||
font.family: ScreenPlay.settings.font
|
||||
opacity: buttonActive ? 1 : .25
|
||||
font.pointSize: 14
|
||||
color: "gray"
|
||||
color: Material.theme === Material.Light ? Qt.lighter(Material.foreground) : Qt.darker(Material.foreground)
|
||||
wrapMode: Text.WrapAnywhere
|
||||
maximumLineCount: 1
|
||||
|
||||
@ -91,7 +93,7 @@ Item {
|
||||
font.family: ScreenPlay.settings.font
|
||||
font.pointSize: 18
|
||||
opacity: buttonActive ? 1 : .25
|
||||
color: "#b9b9b9"
|
||||
color: Material.theme === Material.Light ? Qt.lighter(Material.foreground) : Qt.darker(Material.foreground)
|
||||
anchors {
|
||||
right: parent.right
|
||||
rightMargin: 20
|
||||
|
@ -14,8 +14,8 @@ Rectangle {
|
||||
id: footer
|
||||
height: 80
|
||||
z: 100
|
||||
anchors {
|
||||
}
|
||||
color: Material.background
|
||||
|
||||
Row {
|
||||
anchors.centerIn: parent
|
||||
spacing: 20
|
||||
|
@ -1,8 +1,8 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls 2.3
|
||||
import Qt.labs.platform 1.0
|
||||
import QtQuick.Controls.Material 2.2
|
||||
import Qt.labs.platform 1.0
|
||||
|
||||
import ScreenPlay 1.0
|
||||
|
||||
@ -47,6 +47,8 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
id: importVideoBg
|
||||
color: Material.background
|
||||
|
||||
radius: 3
|
||||
z: 10
|
||||
anchors {
|
||||
@ -79,7 +81,7 @@ Item {
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 20
|
||||
}
|
||||
Material.background: Material.Orange
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
icon.source: "qrc:/assets/icons/icon_upload.svg"
|
||||
icon.color: "white"
|
||||
@ -131,6 +133,8 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
id: convertVideoBg
|
||||
color: Material.background
|
||||
|
||||
radius: 3
|
||||
z: 10
|
||||
anchors {
|
||||
@ -164,7 +168,7 @@ Item {
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 20
|
||||
}
|
||||
Material.background: Material.Orange
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
icon.source: "qrc:/assets/icons/icon_upload.svg"
|
||||
icon.color: "white"
|
||||
@ -233,6 +237,8 @@ Item {
|
||||
Rectangle {
|
||||
id: importVideoBg3
|
||||
radius: 3
|
||||
color: Material.background
|
||||
|
||||
z: 10
|
||||
anchors {
|
||||
fill: parent
|
||||
@ -242,7 +248,7 @@ Item {
|
||||
Button {
|
||||
text: qsTr("Upload Exsisting Project to Steam")
|
||||
anchors.centerIn: parent
|
||||
Material.background: Material.Orange
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
icon.source: "qrc:/assets/icons/icon_steam.svg"
|
||||
icon.color: "white"
|
||||
|
@ -47,13 +47,13 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
id: wrapper
|
||||
color: Material.theme === Material.Light ? "white" : Material.background
|
||||
width: {
|
||||
if(parent.width < 1200) {
|
||||
if (parent.width < 1200) {
|
||||
return parent.width - 20 // Add small margin left and right
|
||||
} else {
|
||||
return 1200
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
height: 580
|
||||
@ -67,7 +67,6 @@ Item {
|
||||
Loader {
|
||||
id: loader_wrapperContent
|
||||
anchors.fill: parent
|
||||
|
||||
}
|
||||
|
||||
CloseIcon {
|
||||
@ -103,7 +102,7 @@ Item {
|
||||
PropertyChanges {
|
||||
target: wrapper
|
||||
anchors.topMargin: {
|
||||
if(root.height < 650){
|
||||
if (root.height < 650) {
|
||||
return 20
|
||||
} else {
|
||||
return 70
|
||||
|
@ -227,7 +227,7 @@ Item {
|
||||
id: btnSave
|
||||
text: qsTr("Save")
|
||||
enabled: false
|
||||
Material.background: Material.Orange
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
font.family: ScreenPlay.settings.font
|
||||
onClicked: {
|
||||
|
@ -177,7 +177,7 @@ Item {
|
||||
id: btnSave
|
||||
text: qsTr("Save")
|
||||
enabled: false
|
||||
Material.background: Material.Orange
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
font.family: ScreenPlay.settings.font
|
||||
|
||||
|
@ -86,7 +86,7 @@ Item {
|
||||
Button {
|
||||
id: btnBack
|
||||
text: qsTr("Back to create and send an error report!")
|
||||
Material.background: Material.Orange
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
font.family: ScreenPlay.settings.font
|
||||
anchors {
|
||||
|
@ -320,7 +320,7 @@ Item {
|
||||
id: btnSave
|
||||
text: qsTr("Save")
|
||||
enabled: false
|
||||
Material.background: Material.Orange
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
font.family: ScreenPlay.settings.font
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
@ -34,7 +35,7 @@ Item {
|
||||
}
|
||||
Connections {
|
||||
target: ScreenPlay.installedListModel
|
||||
function onInstalledLoadingFinished(){
|
||||
function onInstalledLoadingFinished() {
|
||||
checkIsContentInstalled()
|
||||
}
|
||||
function onCountChanged(count) {
|
||||
@ -89,7 +90,7 @@ Item {
|
||||
opacity: 0
|
||||
onIsVisibleChanged: {
|
||||
if (isVisible) {
|
||||
txtHeader.color = "orange"
|
||||
txtHeader.color = Material.accent
|
||||
txtHeader.text = qsTr("Refreshing!")
|
||||
} else {
|
||||
txtHeader.color = "gray"
|
||||
@ -214,7 +215,7 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
id: nav
|
||||
color: "#ffffff"
|
||||
color: Material.theme === Material.Light ? "white" : Material.background
|
||||
height: 50
|
||||
anchors {
|
||||
top: parent.top
|
||||
@ -243,6 +244,7 @@ Item {
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
background: Item {}
|
||||
font.weight: Font.Thin
|
||||
icon.source: "qrc:/assets/icons/icon_installed.svg"
|
||||
onClicked: {
|
||||
setSidebarActive(false)
|
||||
@ -257,6 +259,7 @@ Item {
|
||||
width: implicitWidth
|
||||
height: parent.height
|
||||
background: Item {}
|
||||
font.weight: Font.Thin
|
||||
icon.source: "qrc:/assets/icons/icon_code.svg"
|
||||
onClicked: {
|
||||
setSidebarActive(false)
|
||||
@ -271,6 +274,7 @@ Item {
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
background: Item {}
|
||||
font.weight: Font.Thin
|
||||
icon.source: "qrc:/assets/icons/icon_movie.svg"
|
||||
onClicked: {
|
||||
setSidebarActive(false)
|
||||
@ -285,6 +289,7 @@ Item {
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
background: Item {}
|
||||
font.weight: Font.Thin
|
||||
icon.source: "qrc:/assets/icons/icon_widgets.svg"
|
||||
onClicked: {
|
||||
setSidebarActive(false)
|
||||
|
@ -134,7 +134,7 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
id: sidebarBackground
|
||||
color: "white"
|
||||
color: Material.theme === Material.Light ? "white" : Material.background
|
||||
anchors {
|
||||
top: navBackground.bottom
|
||||
right: parent.right
|
||||
@ -319,8 +319,7 @@ Item {
|
||||
Button {
|
||||
id: btnSetWallpaper
|
||||
text: qsTr("Set wallpaper")
|
||||
Material.accent: Material.Orange
|
||||
Material.background: Material.Orange
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
font.family: ScreenPlay.settings.font
|
||||
icon.source: "qrc:/assets/icons/icon_plus.svg"
|
||||
|
@ -1,9 +1,12 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Rectangle {
|
||||
id: rect
|
||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(Material.background)
|
||||
|
||||
height: availableHeight
|
||||
width: availableWidth
|
||||
|
@ -1,6 +1,7 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import ScreenPlay 1.0
|
||||
import QtQuick.Controls.Material 2.12
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@ -34,6 +35,7 @@ Item {
|
||||
top: wrapper.bottom
|
||||
topMargin: 5
|
||||
}
|
||||
color: Material.foreground
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
@ -38,7 +38,7 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
id: monitorsSettingsWrapper
|
||||
color: "white"
|
||||
color: Material.background
|
||||
radius: 3
|
||||
z: 98
|
||||
width: 1000
|
||||
@ -77,7 +77,6 @@ Item {
|
||||
}
|
||||
MonitorSelection {
|
||||
id: monitorSelection
|
||||
background: "#E4E4E4"
|
||||
radius: 3
|
||||
height: 200
|
||||
z: 99
|
||||
@ -128,7 +127,7 @@ Item {
|
||||
Button {
|
||||
id: btnRemoveSelectedWallpaper
|
||||
text: qsTr("Remove selected")
|
||||
Material.background: Material.Orange
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
font.family: ScreenPlay.settings.font
|
||||
enabled: monitorSelection.activeMonitors.length == 1
|
||||
@ -140,7 +139,7 @@ Item {
|
||||
Button {
|
||||
id: btnRemoveAllWallpaper
|
||||
text: qsTr("Remove all Wallpapers")
|
||||
Material.background: Material.Orange
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
font.family: ScreenPlay.settings.font
|
||||
enabled: ScreenPlay.screenPlayManager.activeWallpaperCounter > 0
|
||||
@ -152,7 +151,7 @@ Item {
|
||||
Button {
|
||||
id: btnRemoveAllWidgets
|
||||
text: qsTr("Remove all Widgets")
|
||||
Material.background: Material.Orange
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
font.family: ScreenPlay.settings.font
|
||||
enabled: ScreenPlay.screenPlayManager.activeWidgetsCounter > 0
|
||||
|
@ -1,5 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
import ScreenPlay 1.0
|
||||
@ -12,7 +13,7 @@ Rectangle {
|
||||
height: 60
|
||||
clip: true
|
||||
width: 1366
|
||||
color: "#ffffff"
|
||||
color: Material.theme === Material.Light ? "white" : Material.background
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
@ -42,11 +43,9 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function onPageChanged(name) {
|
||||
|
||||
|
||||
ScreenPlay.setTrackerSendEvent("navigation",name);
|
||||
ScreenPlay.setTrackerSendEvent("navigation", name)
|
||||
|
||||
if (!navActive)
|
||||
return
|
||||
@ -117,8 +116,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
NavigationWallpaperConfiguration {
|
||||
}
|
||||
NavigationWallpaperConfiguration {}
|
||||
states: [
|
||||
State {
|
||||
name: "enabled"
|
||||
|
@ -1,5 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Item {
|
||||
@ -63,7 +64,7 @@ Item {
|
||||
anchors.left: icon.right
|
||||
anchors.leftMargin: 10
|
||||
font.pointSize: 14
|
||||
color: "#626262"
|
||||
color: Material.foreground
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.family: ScreenPlay.settings.font
|
||||
font.weight: Font.Normal
|
||||
@ -77,7 +78,7 @@ Item {
|
||||
anchors.leftMargin: navigationItem.amount == "" ? 0 : 5
|
||||
text: "name"
|
||||
font.pointSize: 14
|
||||
color: "#626262"
|
||||
color: Material.foreground
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.family: ScreenPlay.settings.font
|
||||
font.weight: Font.Normal
|
||||
@ -87,14 +88,14 @@ Item {
|
||||
id: iconColorOverlay
|
||||
anchors.fill: icon
|
||||
source: icon
|
||||
color: "#FFAB00"
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: navIndicator
|
||||
y: 83
|
||||
height: 3
|
||||
color: "#FFAB00"
|
||||
color: Material.accent
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
@ -113,7 +114,7 @@ Item {
|
||||
|
||||
PropertyChanges {
|
||||
target: iconColorOverlay
|
||||
color: "#FFAB00"
|
||||
color: Material.accent
|
||||
}
|
||||
},
|
||||
State {
|
||||
|
@ -1,5 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
import ScreenPlay 1.0
|
||||
@ -48,7 +49,7 @@ Item {
|
||||
+ ScreenPlay.screenPlayManager.activeWidgetsCounter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: "orange"
|
||||
color: Material.accent
|
||||
font.pointSize: 10
|
||||
font.bold: true
|
||||
font.family: ScreenPlay.settings.font
|
||||
@ -77,7 +78,7 @@ Item {
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
horizontalAlignment: Text.AlignRight
|
||||
color: "#626262"
|
||||
color: Material.foreground
|
||||
font.pointSize: 12
|
||||
font.family: ScreenPlay.settings.font
|
||||
}
|
||||
|
@ -25,9 +25,10 @@ Item {
|
||||
|
||||
Text {
|
||||
id: txtHeadline
|
||||
color: "#5D5D5D"
|
||||
color: Material.foreground
|
||||
text: settingsBool.headline
|
||||
font.family: ScreenPlay.settings.font
|
||||
font.pointSize: 12
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
anchors{
|
||||
@ -38,14 +39,13 @@ Item {
|
||||
|
||||
}
|
||||
|
||||
font.pointSize: 12
|
||||
}
|
||||
|
||||
Text {
|
||||
id: txtDescription
|
||||
text: settingsBool.description
|
||||
wrapMode: Text.WordWrap
|
||||
color: "#B5B5B5"
|
||||
color: Material.theme === Material.Light ? Qt.lighter(Material.foreground) : Qt.darker(Material.foreground)
|
||||
|
||||
font.family: ScreenPlay.settings.font
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
|
@ -1,5 +1,6 @@
|
||||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
@ -51,7 +52,7 @@ Item {
|
||||
|
||||
Item {
|
||||
id: settingsGeneralWrapper
|
||||
height: 540 + txtDirChangesInfo.paintedHeight
|
||||
height: 620 + txtDirChangesInfo.paintedHeight
|
||||
width: parent.width
|
||||
|
||||
RectangularGlow {
|
||||
@ -74,6 +75,7 @@ Item {
|
||||
anchors.fill: parent
|
||||
radius: 4
|
||||
clip: true
|
||||
color: Material.theme === Material.Light ? "white" : Material.background
|
||||
|
||||
SettingsHeader {
|
||||
id: headerGeneral
|
||||
@ -156,7 +158,7 @@ Item {
|
||||
Text {
|
||||
id: txtDirChangesInfo
|
||||
text: qsTr("Important: Changing this directory has no effect on the workshop download path. ScreenPlay only supports having one content folder!")
|
||||
color: "#B5B5B5"
|
||||
color: Qt.darker(Material.foreground)
|
||||
height: 30
|
||||
width: parent.width
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
@ -185,33 +187,63 @@ Item {
|
||||
|
||||
comboBox {
|
||||
onActivated: {
|
||||
ScreenPlay.settings.setLanguage(settingsLanguage.comboBox.currentValue)
|
||||
ScreenPlay.settings.setLanguage(
|
||||
settingsLanguage.comboBox.currentValue)
|
||||
ScreenPlay.settings.retranslateUI()
|
||||
}
|
||||
model: [{
|
||||
"value": Settings.En,
|
||||
"text": qsTr("English")
|
||||
}, {
|
||||
"value": Settings.De,
|
||||
"value": Settings.De,
|
||||
"text": qsTr("German")
|
||||
}, {
|
||||
"value": Settings.Ru,
|
||||
"value": Settings.Ru,
|
||||
"text": qsTr("Russian")
|
||||
}, {
|
||||
"value": Settings.Fr,
|
||||
"value": Settings.Fr,
|
||||
"text": qsTr("French")
|
||||
}, {
|
||||
"value": Settings.Es,
|
||||
"value": Settings.Es,
|
||||
"text": qsTr("Spanish")
|
||||
}, {
|
||||
"value": Settings.Ko,
|
||||
"value": Settings.Ko,
|
||||
"text": qsTr("Korean")
|
||||
}, {
|
||||
"value": Settings.Vi,
|
||||
"value": Settings.Vi,
|
||||
"text": qsTr("Vietnamese")
|
||||
}]
|
||||
}
|
||||
}
|
||||
SettingsHorizontalSeperator {}
|
||||
|
||||
SettingsComboBox {
|
||||
id: settingsTheme
|
||||
headline: qsTr("Theme")
|
||||
description: qsTr("Switch dark/light theme")
|
||||
Component.onCompleted: {
|
||||
settingsTheme.comboBox.currentIndex = root.indexOfValue(
|
||||
settingsTheme.comboBox.model,
|
||||
ScreenPlay.settings.theme)
|
||||
}
|
||||
|
||||
comboBox {
|
||||
onActivated: {
|
||||
ScreenPlay.settings.setTheme(
|
||||
settingsTheme.comboBox.currentValue)
|
||||
}
|
||||
model: [{
|
||||
"value": Settings.System,
|
||||
"text": qsTr("System Default")
|
||||
}, {
|
||||
"value": Settings.Dark,
|
||||
"text": qsTr("Dark")
|
||||
}, {
|
||||
"value": Settings.Light,
|
||||
"text": qsTr("Light")
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -239,6 +271,7 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: Material.theme === Material.Light ? "white" : Material.background
|
||||
radius: 4
|
||||
clip: true
|
||||
|
||||
@ -331,7 +364,7 @@ Item {
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
||||
color: Material.theme === Material.Light ? "white" : Material.background
|
||||
anchors.fill: parent
|
||||
radius: 4
|
||||
clip: true
|
||||
@ -363,13 +396,13 @@ Item {
|
||||
height: 180
|
||||
Text {
|
||||
id: txtHeadline
|
||||
color: "#5D5D5D"
|
||||
color: Material.foreground
|
||||
text: qsTr("Thank you for using ScreenPlay")
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
font.pointSize: 16
|
||||
font.family: ScreenPlay.settings.font
|
||||
font.family: ScreenPlay.settings.font
|
||||
anchors {
|
||||
top: parent.top
|
||||
topMargin: 6
|
||||
@ -380,7 +413,7 @@ Item {
|
||||
Text {
|
||||
id: txtDescriptionAbout
|
||||
text: qsTr("Hi, I'm Elias Steurer also known as Kelteseth and I'm the developer of ScreenPlay. Thank you for using my software. You can follow me to receive updates about ScreenPlay here:")
|
||||
color: "#B5B5B5"
|
||||
color: Qt.darker(Material.foreground)
|
||||
|
||||
wrapMode: Text.WordWrap
|
||||
verticalAlignment: Text.AlignTop
|
||||
|
@ -30,7 +30,7 @@ Item {
|
||||
|
||||
Text {
|
||||
id: txtHeadline
|
||||
color: "#5D5D5D"
|
||||
color: Material.foreground
|
||||
text: settingsButton.headline
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
@ -48,7 +48,7 @@ Item {
|
||||
Text {
|
||||
id: txtDescription
|
||||
text: settingsButton.description
|
||||
color: "#B5B5B5"
|
||||
color: Material.theme === Material.Light ? Qt.lighter(Material.foreground) : Qt.darker(Material.foreground)
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
wrapMode: Text.WordWrap
|
||||
@ -68,11 +68,11 @@ Item {
|
||||
Button {
|
||||
id: btnSettings
|
||||
text: settingsButton.buttonText
|
||||
Material.background: Material.Orange
|
||||
Material.foreground: "white"
|
||||
icon.width: 20
|
||||
icon.height: 20
|
||||
font.family: ScreenPlay.settings.font
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
anchors {
|
||||
right: parent.right
|
||||
rightMargin: 20
|
||||
|
@ -1,5 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls.Material 2.2
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Item {
|
||||
@ -14,7 +15,7 @@ Item {
|
||||
|
||||
Text {
|
||||
id: txtHeadline
|
||||
color: "#5D5D5D"
|
||||
color: Material.foreground
|
||||
text: settingsComboBox.headline
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
@ -33,7 +34,7 @@ Item {
|
||||
Text {
|
||||
id: txtDescription
|
||||
text: settingsComboBox.description
|
||||
color: "#B5B5B5"
|
||||
color: Qt.darker(Material.foreground)
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
|
@ -2,9 +2,10 @@ import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Controls.Material 2.2
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Rectangle {
|
||||
Item {
|
||||
id: root
|
||||
state: "off"
|
||||
clip: true
|
||||
@ -29,8 +30,8 @@ Rectangle {
|
||||
left: parent.left
|
||||
margins: 20
|
||||
}
|
||||
color: Material.theme === Material.Light ? Qt.lighter(Material.foreground) : Qt.darker(Material.foreground)
|
||||
lineHeight: 1.2
|
||||
color: "#626262"
|
||||
height: txtExpander.paintedHeight
|
||||
wrapMode: Text.WordWrap
|
||||
font.family: ScreenPlay.settings.font
|
||||
|
@ -1,13 +1,14 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
|
||||
Item {
|
||||
property real customWidth: parent.width
|
||||
property real customHeight: 1
|
||||
property color customColor: "#dddddd"
|
||||
property color customColor: Material.theme === Material.Light ? "#eeeeee" : Qt.darker(Material.foreground)
|
||||
property real customMargin: 10
|
||||
|
||||
height: customMargin
|
||||
width:customWidth
|
||||
width: customWidth
|
||||
|
||||
Rectangle {
|
||||
height: customHeight
|
||||
@ -17,8 +18,8 @@ Item {
|
||||
right: parent.right
|
||||
rightMargin: customMargin
|
||||
left: parent.left
|
||||
leftMargin:customMargin
|
||||
|
||||
leftMargin: customMargin
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,8 +4,4 @@ Style=Material
|
||||
[Material]
|
||||
Theme=Light
|
||||
Accent=Orange
|
||||
Primary=White
|
||||
Foreground=Grey
|
||||
Font\Family=Roboto
|
||||
Font\PixelSize=12
|
||||
Variant=Dense
|
||||
|
@ -39,6 +39,8 @@ Settings::Settings(const shared_ptr<GlobalVariables>& globalVariables,
|
||||
{
|
||||
qRegisterMetaType<Settings::FillMode>("Settings::FillMode");
|
||||
qRegisterMetaType<Settings::Language>("Settings::Language");
|
||||
qRegisterMetaType<Settings::Theme>("Settings::Theme");
|
||||
|
||||
qmlRegisterUncreatableType<Settings>("Settings", 1, 0, "Settings", "Error only for enums");
|
||||
|
||||
if (!m_qSettings.contains("Autostart")) {
|
||||
@ -57,6 +59,7 @@ Settings::Settings(const shared_ptr<GlobalVariables>& globalVariables,
|
||||
setAutostart(m_qSettings.value("Autostart", true).toBool());
|
||||
}
|
||||
|
||||
|
||||
setCheckWallpaperVisible(m_qSettings.value("CheckWallpaperVisible", false).toBool());
|
||||
setHighPriorityStart(m_qSettings.value("ScreenPlayExecutable", false).toBool());
|
||||
if (m_qSettings.contains("VideoFillMode")) {
|
||||
@ -65,6 +68,11 @@ Settings::Settings(const shared_ptr<GlobalVariables>& globalVariables,
|
||||
} else {
|
||||
setVideoFillMode(FillMode::Cover);
|
||||
}
|
||||
|
||||
if (m_qSettings.contains("Theme")) {
|
||||
auto value = m_qSettings.value("Theme").toString();
|
||||
setTheme(QStringToEnum<Theme>(value, Theme::System));
|
||||
}
|
||||
|
||||
setAnonymousTelemetry(m_qSettings.value("AnonymousTelemetry", true).toBool());
|
||||
|
||||
|
@ -69,6 +69,7 @@ class Settings : public QObject {
|
||||
|
||||
Q_PROPERTY(FillMode videoFillMode READ videoFillMode WRITE setVideoFillMode NOTIFY videoFillModeChanged)
|
||||
Q_PROPERTY(Language language READ language WRITE setLanguage NOTIFY languageChanged)
|
||||
Q_PROPERTY(Theme theme READ theme WRITE setTheme NOTIFY themeChanged)
|
||||
|
||||
Q_PROPERTY(QString decoder READ decoder WRITE setDecoder NOTIFY decoderChanged)
|
||||
Q_PROPERTY(QString gitBuildHash READ gitBuildHash WRITE setGitBuildHash NOTIFY gitBuildHashChanged)
|
||||
@ -99,6 +100,13 @@ public:
|
||||
};
|
||||
Q_ENUM(Language)
|
||||
|
||||
enum class Theme {
|
||||
System,
|
||||
Dark,
|
||||
Light
|
||||
};
|
||||
Q_ENUM(Theme)
|
||||
|
||||
bool offlineMode() const
|
||||
{
|
||||
return m_offlineMode;
|
||||
@ -162,6 +170,11 @@ public:
|
||||
return m_font;
|
||||
}
|
||||
|
||||
Theme theme() const
|
||||
{
|
||||
return m_theme;
|
||||
}
|
||||
|
||||
signals:
|
||||
void requestRetranslation();
|
||||
void resetInstalledListmodel();
|
||||
@ -180,6 +193,8 @@ signals:
|
||||
void languageChanged(Language language);
|
||||
void fontChanged(QString font);
|
||||
|
||||
void themeChanged(Theme theme);
|
||||
|
||||
public slots:
|
||||
void writeJsonFileFromResource(const QString& filename);
|
||||
void setupWidgetAndWindowPaths();
|
||||
@ -325,6 +340,17 @@ public slots:
|
||||
emit fontChanged(m_font);
|
||||
}
|
||||
|
||||
void setTheme(Theme theme)
|
||||
{
|
||||
if (m_theme == theme)
|
||||
return;
|
||||
|
||||
setqSetting("Theme", QVariant::fromValue(theme).toString());
|
||||
|
||||
m_theme = theme;
|
||||
emit themeChanged(m_theme);
|
||||
}
|
||||
|
||||
private:
|
||||
void restoreDefault(const QString& appConfigLocation, const QString& settingsFileType);
|
||||
|
||||
@ -343,8 +369,9 @@ private:
|
||||
|
||||
QString m_gitBuildHash;
|
||||
QString m_decoder;
|
||||
FillMode m_videoFillMode = FillMode::Cover;
|
||||
Language m_language = Language::En;
|
||||
FillMode m_videoFillMode { FillMode::Cover };
|
||||
Language m_language { Language::En };
|
||||
Theme m_theme { Theme::System };
|
||||
QString m_font {"Roboto"};
|
||||
};
|
||||
}
|
||||
|
@ -56,3 +56,9 @@ target_link_libraries(${PROJECT_NAME}
|
||||
Qt5::WebEngine
|
||||
ScreenPlaySDK
|
||||
)
|
||||
|
||||
|
||||
install(FILES
|
||||
index.html
|
||||
DESTINATION
|
||||
${CMAKE_BINARY_DIR} )
|
||||
|
@ -7,8 +7,8 @@ BaseWindow::BaseWindow(QObject* parent)
|
||||
|
||||
BaseWindow::BaseWindow(QString projectFilePath, const QVector<int> activeScreensList, const bool checkWallpaperVisible)
|
||||
: QObject(nullptr)
|
||||
, m_activeScreensList(activeScreensList)
|
||||
, m_checkWallpaperVisible(checkWallpaperVisible)
|
||||
, m_activeScreensList(activeScreensList)
|
||||
{
|
||||
QApplication::instance()->installEventFilter(this);
|
||||
qRegisterMetaType<BaseWindow::WallpaperType>();
|
||||
|
Loading…
Reference in New Issue
Block a user