1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-22 02:32:29 +01:00

Fix material button color

This commit is contained in:
Elias Steurer 2021-10-07 17:43:32 +02:00
parent 0cbd8532cb
commit 160645ccc0
8 changed files with 38 additions and 48 deletions

View File

@ -30,7 +30,7 @@ Item {
property alias placeHolderText: txtPlaceholder.text
property alias fileDialog: fileDialog
height: 70
height: 65
implicitWidth: 300
state: "nothingSelected"
onFileChanged: {
@ -59,7 +59,6 @@ Item {
clip: true
font.pointSize: 12
font.capitalization: Font.Capitalize
font.family: ScreenPlay.settings.font
wrapMode: Text.WordWrap
color: Material.secondaryTextColor

View File

@ -8,28 +8,29 @@ Item {
id: root
function getTags() {
var array = [];
var array = []
for (var i = 0; i < listModel.count; i++) {
array.push(listModel.get(i)._name);
array.push(listModel.get(i)._name)
}
return array;
return array
}
height: 70
implicitWidth: 200
onStateChanged: {
if (root.state === "add") {
btnAdd.text = qsTr("Save");
textField.focus = true;
btnAdd.text = qsTr("Save")
textField.focus = true
} else {
btnAdd.text = qsTr("Add tag");
btnAdd.text = qsTr("Add tag")
}
}
Rectangle {
id: rectangle
color: Material.theme === Material.Light ? Material.background : Qt.darker(Material.background)
color: Material.theme === Material.Light ? Material.background : Qt.darker(
Material.background)
radius: 3
clip: true
@ -59,14 +60,12 @@ Item {
Connections {
function onRemoveThis() {
listModel.remove(itemIndex);
listModel.remove(itemIndex)
}
target: delegate
}
}
}
ListModel {
@ -83,7 +82,9 @@ Item {
radius: 3
height: parent.height - 20
width: 200
color: Material.theme === Material.Light ? Qt.lighter(Material.background) : Material.background
color: Material.theme
=== Material.Light ? Qt.lighter(
Material.background) : Material.background
anchors {
top: parent.top
@ -102,7 +103,6 @@ Item {
position: 1
color: "#FF000000"
}
}
TextField {
@ -112,8 +112,7 @@ Item {
color: Material.primaryTextColor
onTextChanged: {
if (textField.length >= 10)
textField.text = textField.text;
textField.text = textField.text
}
anchors {
@ -121,9 +120,7 @@ Item {
rightMargin: 15
leftMargin: 15
}
}
}
Button {
@ -133,12 +130,12 @@ Item {
opacity: 0
height: parent.height - 20
enabled: false
Material.background: Material.Red
Material.foreground: "white"
Material.accent: Material.color(Material.Red)
highlighted: true
font.family: ScreenPlay.settings.font
onClicked: {
root.state = "";
textField.clear();
root.state = ""
textField.clear()
}
anchors {
@ -146,7 +143,6 @@ Item {
rightMargin: 10
verticalCenter: parent.verticalCenter
}
}
Button {
@ -154,18 +150,18 @@ Item {
text: qsTr("Add Tag")
height: parent.height - 20
Material.background: Material.LightGreen
Material.foreground: "white"
Material.accent: Material.color(Material.LightGreen)
highlighted: true
font.family: ScreenPlay.settings.font
onClicked: {
if (root.state === "add") {
listModel.append({
"_name": textField.text
});
textField.clear();
root.state = "";
"_name": textField.text
})
textField.clear()
root.state = ""
} else {
root.state = "add";
root.state = "add"
}
}
@ -174,9 +170,7 @@ Item {
rightMargin: 10
verticalCenter: parent.verticalCenter
}
}
}
states: [
@ -195,7 +189,6 @@ Item {
opacity: 1
enabled: true
}
}
]
transitions: [
@ -209,7 +202,6 @@ Item {
duration: 200
easing.type: Easing.OutQuart
}
}
]
}

View File

@ -111,8 +111,8 @@ Item {
Button {
text: qsTr("Open Documentation")
Material.background: Material.LightGreen
Material.foreground: "white"
Material.accent: Material.color(Material.LightGreen)
highlighted: true
icon.source: "qrc:/assets/icons/icon_document.svg"
icon.color: "white"
icon.width: 16

View File

@ -326,8 +326,8 @@ Item {
id: btnExit
text: qsTr("Abort")
Material.background: Material.Red
Material.foreground: "white"
Material.accent: Material.color(Material.Red)
highlighted: true
font.family: ScreenPlay.settings.font
onClicked: {
root.abort()

View File

@ -327,8 +327,8 @@ Item {
id: btnExit
text: qsTr("Abort")
Material.background: Material.Red
Material.foreground: "white"
Material.accent: Material.color(Material.Red)
highlighted: true
font.family: ScreenPlay.settings.font
onClicked: {
root.exit();

View File

@ -138,8 +138,8 @@ Item {
id: btnOpenDocs
text: qsTr("Open Documentation")
Material.background: Material.LightGreen
Material.foreground: "white"
Material.accent: Material.color(Material.LightGreen)
highlighted: true
icon.source: "qrc:/assets/icons/icon_document.svg"
icon.color: "white"
icon.width: 16

View File

@ -148,8 +148,8 @@ Item {
Button {
text: qsTr("Download now!")
Material.background: Material.accent
Material.foreground: "white"
Material.accent: Material.color(Material.Orange)
highlighted: true
icon.source: "qrc:/assets/icons/icon_download.svg"
onClicked: {
text = qsTr("Downloading...")
@ -161,8 +161,8 @@ Item {
Button {
text: qsTr("Details")
Material.background: Material.accent
Material.foreground: "white"
Material.accent: Material.color(Material.Orange)
highlighted: true
icon.source: "qrc:/assets/icons/icon_info.svg"
visible: false
onClicked: {

View File

@ -54,9 +54,8 @@ Popup {
id: btnAgree
text: qsTr("Accept Steam Workshop Agreement")
Material.accent: Material.color(Material.Orange)
highlighted: true
Material.background: Material.accent
Material.foreground: "white"
onClicked: {
Qt.openUrlExternally("https://steamcommunity.com/sharedfiles/workshoplegalagreement");
root.close();