mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-01 16:19:47 +02:00
Fix material button color
This commit is contained in:
parent
0cbd8532cb
commit
160645ccc0
@ -30,7 +30,7 @@ Item {
|
|||||||
property alias placeHolderText: txtPlaceholder.text
|
property alias placeHolderText: txtPlaceholder.text
|
||||||
property alias fileDialog: fileDialog
|
property alias fileDialog: fileDialog
|
||||||
|
|
||||||
height: 70
|
height: 65
|
||||||
implicitWidth: 300
|
implicitWidth: 300
|
||||||
state: "nothingSelected"
|
state: "nothingSelected"
|
||||||
onFileChanged: {
|
onFileChanged: {
|
||||||
@ -59,7 +59,6 @@ Item {
|
|||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
font.capitalization: Font.Capitalize
|
|
||||||
font.family: ScreenPlay.settings.font
|
font.family: ScreenPlay.settings.font
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Material.secondaryTextColor
|
color: Material.secondaryTextColor
|
||||||
|
@ -8,28 +8,29 @@ Item {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
function getTags() {
|
function getTags() {
|
||||||
var array = [];
|
var array = []
|
||||||
for (var i = 0; i < listModel.count; i++) {
|
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
|
height: 70
|
||||||
implicitWidth: 200
|
implicitWidth: 200
|
||||||
onStateChanged: {
|
onStateChanged: {
|
||||||
if (root.state === "add") {
|
if (root.state === "add") {
|
||||||
btnAdd.text = qsTr("Save");
|
btnAdd.text = qsTr("Save")
|
||||||
textField.focus = true;
|
textField.focus = true
|
||||||
} else {
|
} else {
|
||||||
btnAdd.text = qsTr("Add tag");
|
btnAdd.text = qsTr("Add tag")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: 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
|
radius: 3
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
@ -59,14 +60,12 @@ Item {
|
|||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onRemoveThis() {
|
function onRemoveThis() {
|
||||||
listModel.remove(itemIndex);
|
listModel.remove(itemIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
target: delegate
|
target: delegate
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
@ -83,7 +82,9 @@ Item {
|
|||||||
radius: 3
|
radius: 3
|
||||||
height: parent.height - 20
|
height: parent.height - 20
|
||||||
width: 200
|
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 {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
@ -102,7 +103,6 @@ Item {
|
|||||||
position: 1
|
position: 1
|
||||||
color: "#FF000000"
|
color: "#FF000000"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
@ -112,8 +112,7 @@ Item {
|
|||||||
color: Material.primaryTextColor
|
color: Material.primaryTextColor
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
if (textField.length >= 10)
|
if (textField.length >= 10)
|
||||||
textField.text = textField.text;
|
textField.text = textField.text
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
@ -121,9 +120,7 @@ Item {
|
|||||||
rightMargin: 15
|
rightMargin: 15
|
||||||
leftMargin: 15
|
leftMargin: 15
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
@ -133,12 +130,12 @@ Item {
|
|||||||
opacity: 0
|
opacity: 0
|
||||||
height: parent.height - 20
|
height: parent.height - 20
|
||||||
enabled: false
|
enabled: false
|
||||||
Material.background: Material.Red
|
Material.accent: Material.color(Material.Red)
|
||||||
Material.foreground: "white"
|
highlighted: true
|
||||||
font.family: ScreenPlay.settings.font
|
font.family: ScreenPlay.settings.font
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.state = "";
|
root.state = ""
|
||||||
textField.clear();
|
textField.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
@ -146,7 +143,6 @@ Item {
|
|||||||
rightMargin: 10
|
rightMargin: 10
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
@ -154,18 +150,18 @@ Item {
|
|||||||
|
|
||||||
text: qsTr("Add Tag")
|
text: qsTr("Add Tag")
|
||||||
height: parent.height - 20
|
height: parent.height - 20
|
||||||
Material.background: Material.LightGreen
|
Material.accent: Material.color(Material.LightGreen)
|
||||||
Material.foreground: "white"
|
highlighted: true
|
||||||
font.family: ScreenPlay.settings.font
|
font.family: ScreenPlay.settings.font
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (root.state === "add") {
|
if (root.state === "add") {
|
||||||
listModel.append({
|
listModel.append({
|
||||||
"_name": textField.text
|
"_name": textField.text
|
||||||
});
|
})
|
||||||
textField.clear();
|
textField.clear()
|
||||||
root.state = "";
|
root.state = ""
|
||||||
} else {
|
} else {
|
||||||
root.state = "add";
|
root.state = "add"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,9 +170,7 @@ Item {
|
|||||||
rightMargin: 10
|
rightMargin: 10
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
states: [
|
states: [
|
||||||
@ -195,7 +189,6 @@ Item {
|
|||||||
opacity: 1
|
opacity: 1
|
||||||
enabled: true
|
enabled: true
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
transitions: [
|
transitions: [
|
||||||
@ -209,7 +202,6 @@ Item {
|
|||||||
duration: 200
|
duration: 200
|
||||||
easing.type: Easing.OutQuart
|
easing.type: Easing.OutQuart
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -111,8 +111,8 @@ Item {
|
|||||||
|
|
||||||
Button {
|
Button {
|
||||||
text: qsTr("Open Documentation")
|
text: qsTr("Open Documentation")
|
||||||
Material.background: Material.LightGreen
|
Material.accent: Material.color(Material.LightGreen)
|
||||||
Material.foreground: "white"
|
highlighted: true
|
||||||
icon.source: "qrc:/assets/icons/icon_document.svg"
|
icon.source: "qrc:/assets/icons/icon_document.svg"
|
||||||
icon.color: "white"
|
icon.color: "white"
|
||||||
icon.width: 16
|
icon.width: 16
|
||||||
|
@ -326,8 +326,8 @@ Item {
|
|||||||
id: btnExit
|
id: btnExit
|
||||||
|
|
||||||
text: qsTr("Abort")
|
text: qsTr("Abort")
|
||||||
Material.background: Material.Red
|
Material.accent: Material.color(Material.Red)
|
||||||
Material.foreground: "white"
|
highlighted: true
|
||||||
font.family: ScreenPlay.settings.font
|
font.family: ScreenPlay.settings.font
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.abort()
|
root.abort()
|
||||||
|
@ -327,8 +327,8 @@ Item {
|
|||||||
id: btnExit
|
id: btnExit
|
||||||
|
|
||||||
text: qsTr("Abort")
|
text: qsTr("Abort")
|
||||||
Material.background: Material.Red
|
Material.accent: Material.color(Material.Red)
|
||||||
Material.foreground: "white"
|
highlighted: true
|
||||||
font.family: ScreenPlay.settings.font
|
font.family: ScreenPlay.settings.font
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.exit();
|
root.exit();
|
||||||
|
@ -138,8 +138,8 @@ Item {
|
|||||||
id: btnOpenDocs
|
id: btnOpenDocs
|
||||||
|
|
||||||
text: qsTr("Open Documentation")
|
text: qsTr("Open Documentation")
|
||||||
Material.background: Material.LightGreen
|
Material.accent: Material.color(Material.LightGreen)
|
||||||
Material.foreground: "white"
|
highlighted: true
|
||||||
icon.source: "qrc:/assets/icons/icon_document.svg"
|
icon.source: "qrc:/assets/icons/icon_document.svg"
|
||||||
icon.color: "white"
|
icon.color: "white"
|
||||||
icon.width: 16
|
icon.width: 16
|
||||||
|
@ -148,8 +148,8 @@ Item {
|
|||||||
|
|
||||||
Button {
|
Button {
|
||||||
text: qsTr("Download now!")
|
text: qsTr("Download now!")
|
||||||
Material.background: Material.accent
|
Material.accent: Material.color(Material.Orange)
|
||||||
Material.foreground: "white"
|
highlighted: true
|
||||||
icon.source: "qrc:/assets/icons/icon_download.svg"
|
icon.source: "qrc:/assets/icons/icon_download.svg"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
text = qsTr("Downloading...")
|
text = qsTr("Downloading...")
|
||||||
@ -161,8 +161,8 @@ Item {
|
|||||||
|
|
||||||
Button {
|
Button {
|
||||||
text: qsTr("Details")
|
text: qsTr("Details")
|
||||||
Material.background: Material.accent
|
Material.accent: Material.color(Material.Orange)
|
||||||
Material.foreground: "white"
|
highlighted: true
|
||||||
icon.source: "qrc:/assets/icons/icon_info.svg"
|
icon.source: "qrc:/assets/icons/icon_info.svg"
|
||||||
visible: false
|
visible: false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -54,9 +54,8 @@ Popup {
|
|||||||
id: btnAgree
|
id: btnAgree
|
||||||
|
|
||||||
text: qsTr("Accept Steam Workshop Agreement")
|
text: qsTr("Accept Steam Workshop Agreement")
|
||||||
|
Material.accent: Material.color(Material.Orange)
|
||||||
highlighted: true
|
highlighted: true
|
||||||
Material.background: Material.accent
|
|
||||||
Material.foreground: "white"
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Qt.openUrlExternally("https://steamcommunity.com/sharedfiles/workshoplegalagreement");
|
Qt.openUrlExternally("https://steamcommunity.com/sharedfiles/workshoplegalagreement");
|
||||||
root.close();
|
root.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user