1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-08 03:52:42 +01:00

Change more QML Items from hardcoded values to Material variables

This commit is contained in:
Elias Steurer 2020-03-19 14:13:44 +01:00
parent bdc4b4ced6
commit bbc7c7caab
17 changed files with 46 additions and 44 deletions

View File

@ -26,7 +26,7 @@ Rectangle {
id: overlay
anchors.fill: icon
source: icon
color: "orange"
color: Material.accent
}
MouseArea {

View File

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

View File

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

View File

@ -76,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
@ -93,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

View File

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

View File

@ -90,7 +90,7 @@ Item {
opacity: 0
onIsVisibleChanged: {
if (isVisible) {
txtHeader.color = "orange"
txtHeader.color = Material.accent
txtHeader.text = qsTr("Refreshing!")
} else {
txtHeader.color = "gray"
@ -215,7 +215,7 @@ Item {
Rectangle {
id: nav
color: Material.background
color: Material.theme === Material.Light ? "white" : Material.background
height: 50
anchors {
top: parent.top
@ -242,9 +242,11 @@ Item {
icon.height: 16
icon.width: 16
height: parent.height
width: implicitWidth
background: Item {}
icon.source: "qrc:/assets/icons/icon_installed.svg"
onClicked: {
setSidebarActive(false)
ScreenPlay.installedListFilter.sortByRoleType("All")

View File

@ -134,7 +134,7 @@ Item {
Rectangle {
id: sidebarBackground
color: Material.background
color: Material.theme === Material.Light ? "white" : Material.background
anchors {
top: navBackground.bottom
right: parent.right

View File

@ -6,13 +6,7 @@ import ScreenPlay 1.0
Rectangle {
id: rect
color: {
if(Material.theme === Material.Dark){
return Qt.darker(Material.background)
} else {
return Material.background
}
}
color: Qt.darker(Material.background)
height: availableHeight
width: availableWidth

View File

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

View File

@ -13,7 +13,7 @@ Rectangle {
height: 60
clip: true
width: 1366
color: Material.background
color: Material.theme === Material.Light ? "white" : Material.background
MouseArea {
anchors.fill: parent

View File

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

View File

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

View File

@ -75,7 +75,7 @@ Item {
anchors.fill: parent
radius: 4
clip: true
color: Material.backgroundColor
color: Material.theme === Material.Light ? "white" : Material.background
SettingsHeader {
id: headerGeneral
@ -158,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
@ -229,7 +229,8 @@ Item {
comboBox {
onActivated: {
ScreenPlay.settings.setTheme(settingsTheme.comboBox.currentValue)
ScreenPlay.settings.setTheme(
settingsTheme.comboBox.currentValue)
}
model: [{
"value": Settings.System,
@ -270,7 +271,7 @@ Item {
Rectangle {
anchors.fill: parent
color: Material.backgroundColor
color: Material.theme === Material.Light ? "white" : Material.background
radius: 4
clip: true
@ -363,7 +364,7 @@ Item {
}
Rectangle {
color: Material.backgroundColor
color: Material.theme === Material.Light ? "white" : Material.background
anchors.fill: parent
radius: 4
clip: true
@ -395,7 +396,7 @@ Item {
height: 180
Text {
id: txtHeadline
color: "#5D5D5D"
color: Material.foreground
text: qsTr("Thank you for using ScreenPlay")
verticalAlignment: Text.AlignVCenter
@ -412,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

View File

@ -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
@ -71,6 +71,8 @@ Item {
icon.width: 20
icon.height: 20
font.family: ScreenPlay.settings.font
Material.background: Material.accent
Material.foreground: "white"
anchors {
right: parent.right
rightMargin: 20

View File

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

View File

@ -2,6 +2,7 @@ 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
Item {
@ -29,7 +30,8 @@ Item {
left: parent.left
margins: 20
}
color: "#626262"
color: Material.theme === Material.Light ? Qt.lighter(Material.foreground) : Qt.darker(Material.foreground)
height: txtExpander.paintedHeight
wrapMode: Text.WordWrap
font.family: ScreenPlay.settings.font

View File

@ -4,11 +4,11 @@ import QtQuick.Controls.Material 2.12
Item {
property real customWidth: parent.width
property real customHeight: 1
property color customColor: Material.background
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
@ -18,8 +18,8 @@ Item {
right: parent.right
rightMargin: customMargin
left: parent.left
leftMargin:customMargin
leftMargin: customMargin
verticalCenter: parent.verticalCenter
}
}
}