mirror of
https://github.com/Keyitdev/sddm-astronaut-theme.git
synced 2026-09-24 02:22:09 +00:00
Major Update: Changed syntax of colors.
This commit is contained in:
@@ -14,7 +14,7 @@ Column {
|
||||
Label {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
font.pointSize: config.HeaderText !=="" ? root.font.pointSize * 3 : 0
|
||||
color: root.palette.text
|
||||
color: config.HeaderTextColor
|
||||
renderType: Text.QtRendering
|
||||
text: config.HeaderText
|
||||
}
|
||||
@@ -24,7 +24,7 @@ Column {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
font.pointSize: root.font.pointSize * 9
|
||||
font.bold: true
|
||||
color: root.palette.text
|
||||
color: config.DateTextColor
|
||||
renderType: Text.QtRendering
|
||||
function updateTime() {
|
||||
text = new Date().toLocaleTimeString(Qt.locale(config.Locale), config.HourFormat == "long" ? Locale.LongFormat : config.HourFormat !== "" ? config.HourFormat : Locale.ShortFormat)
|
||||
@@ -34,7 +34,7 @@ Column {
|
||||
Label {
|
||||
id: dateLabel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: root.palette.text
|
||||
color: config.TimeTextColor
|
||||
font.pointSize: root.font.pointSize * 2
|
||||
font.bold: true
|
||||
renderType: Text.QtRendering
|
||||
|
||||
+29
-27
@@ -26,7 +26,7 @@ Column {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pointSize: root.font.pointSize * 0.8
|
||||
font.italic: true
|
||||
color: root.palette.text
|
||||
color: config.WarningColor
|
||||
opacity: 0
|
||||
states: [
|
||||
State {
|
||||
@@ -98,13 +98,13 @@ Column {
|
||||
text: model.name
|
||||
font.pointSize: root.font.pointSize * 0.8
|
||||
font.capitalization: Font.AllLowercase
|
||||
color: selectUser.highlightedIndex === index ? root.palette.highlight.hslLightness >= 0.7 ? "#444" : "white" : root.palette.window.hslLightness >= 0.8 ? root.palette.highlight.hslLightness >= 0.8 ? "#444" : root.palette.highlight : "white"
|
||||
color: config.DropdownTextColor
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
highlighted: parent.highlightedIndex === index
|
||||
background: Rectangle {
|
||||
color: selectUser.highlightedIndex === index ? root.palette.highlight : "transparent"
|
||||
color: selectUser.highlightedIndex === index ? config.DropdownSelectedBackgroundColor : "transparent"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ Column {
|
||||
icon.height: parent.height * 0.25
|
||||
icon.width: parent.height * 0.25
|
||||
enabled: false
|
||||
icon.color: root.palette.text
|
||||
icon.color: config.UserIconColor
|
||||
icon.source: Qt.resolvedUrl("../Assets/User.svg")
|
||||
|
||||
background: Rectangle {
|
||||
@@ -150,7 +150,7 @@ Column {
|
||||
|
||||
background: Rectangle {
|
||||
radius: config.RoundCorners / 2
|
||||
color: root.palette.alternateBase
|
||||
color: config.DropdownBackgroundColor
|
||||
layer.enabled: true
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ Column {
|
||||
when: selectUser.down
|
||||
PropertyChanges {
|
||||
target: usernameIcon
|
||||
icon.color: Qt.lighter(root.palette.highlight, 1.1)
|
||||
icon.color: Qt.lighter(config.HoverUserIconColor, 1.1)
|
||||
}
|
||||
},
|
||||
State {
|
||||
@@ -173,7 +173,7 @@ Column {
|
||||
when: selectUser.hovered
|
||||
PropertyChanges {
|
||||
target: usernameIcon
|
||||
icon.color: Qt.lighter(root.palette.highlight, 1.2)
|
||||
icon.color: Qt.lighter(config.HoverUserIconColor, 1.2)
|
||||
}
|
||||
},
|
||||
State {
|
||||
@@ -181,7 +181,7 @@ Column {
|
||||
when: selectUser.activeFocus
|
||||
PropertyChanges {
|
||||
target: usernameIcon
|
||||
icon.color: root.palette.highlight
|
||||
icon.color: config.HoverUserIconColor
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -200,13 +200,14 @@ Column {
|
||||
TextField {
|
||||
id: username
|
||||
text: config.ForceLastUser == "true" ? selectUser.currentText : null
|
||||
color: config.LoginFieldTextColor
|
||||
font.bold: true
|
||||
font.capitalization: config.AllowUppercaseLettersInUsernames == "false" ? Font.AllLowercase : Font.MixedCase
|
||||
anchors.centerIn: parent
|
||||
height: root.font.pointSize * 3
|
||||
width: parent.width
|
||||
placeholderText: config.TranslatePlaceholderUsername || textConstants.userName
|
||||
placeholderTextColor: root.palette.shadow
|
||||
placeholderTextColor: config.PlacholderTextColor
|
||||
selectByMouse: true
|
||||
horizontalAlignment: TextInput.AlignHCenter
|
||||
renderType: Text.QtRendering
|
||||
@@ -215,7 +216,7 @@ Column {
|
||||
selectAll()
|
||||
}
|
||||
background: Rectangle {
|
||||
color: "#222222"
|
||||
color: config.LoginFieldBackgroundColor
|
||||
opacity: 0.2
|
||||
border.color: "transparent"
|
||||
border.width: parent.activeFocus ? 2 : 1
|
||||
@@ -231,11 +232,11 @@ Column {
|
||||
when: username.activeFocus
|
||||
PropertyChanges {
|
||||
target: username.background
|
||||
border.color: root.palette.highlight
|
||||
border.color: config.HighlightBorderColor
|
||||
}
|
||||
PropertyChanges {
|
||||
target: username
|
||||
color: root.palette.highlightedText
|
||||
color: Qt.lighter(config.LoginFieldTextColor, 1.15)
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -259,7 +260,7 @@ Column {
|
||||
anchors.leftMargin: selectUser.height * 0
|
||||
icon.height: parent.height * 0.25
|
||||
icon.width: parent.height * 0.25
|
||||
icon.color: root.palette.text
|
||||
icon.color: config.PasswordIconColor
|
||||
icon.source: Qt.resolvedUrl("../Assets/Password2.svg")
|
||||
|
||||
background: Rectangle {
|
||||
@@ -274,7 +275,7 @@ Column {
|
||||
PropertyChanges {
|
||||
target: showPassword
|
||||
icon.source: Qt.resolvedUrl("../Assets/Password.svg")
|
||||
icon.color: root.palette.highlight
|
||||
icon.color: config.HoverPasswordIconColor
|
||||
}
|
||||
},
|
||||
State {
|
||||
@@ -283,7 +284,7 @@ Column {
|
||||
PropertyChanges {
|
||||
target: showPassword
|
||||
icon.source: Qt.resolvedUrl("../Assets/Password.svg")
|
||||
icon.color: root.palette.highlight
|
||||
icon.color: config.HoverPasswordIconColor
|
||||
}
|
||||
},
|
||||
State {
|
||||
@@ -300,7 +301,7 @@ Column {
|
||||
PropertyChanges {
|
||||
target: showPassword
|
||||
icon.source: Qt.resolvedUrl("../Assets/Password2.svg")
|
||||
icon.color: root.palette.highlight
|
||||
icon.color: config.HoverPasswordIconColor
|
||||
}
|
||||
},
|
||||
State {
|
||||
@@ -309,7 +310,7 @@ Column {
|
||||
PropertyChanges {
|
||||
target: showPassword
|
||||
icon.source: Qt.resolvedUrl("../Assets/Password2.svg")
|
||||
icon.color: root.palette.highlight
|
||||
icon.color: config.HoverPasswordIconColor
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -324,6 +325,7 @@ Column {
|
||||
TextField {
|
||||
id: password
|
||||
anchors.centerIn: parent
|
||||
color: config.PasswordFieldTextColor
|
||||
height: root.font.pointSize * 3
|
||||
width: parent.width
|
||||
font.bold: true
|
||||
@@ -331,13 +333,13 @@ Column {
|
||||
selectByMouse: true
|
||||
echoMode: showPassword.checked ? TextInput.Normal : TextInput.Password
|
||||
placeholderText: config.TranslatePlaceholderPassword || textConstants.password
|
||||
placeholderTextColor: root.palette.shadow
|
||||
placeholderTextColor: config.PlacholderTextColor
|
||||
horizontalAlignment: TextInput.AlignHCenter
|
||||
passwordCharacter: "•"
|
||||
passwordMaskDelay: config.HideCompletePassword == "true" ? undefined : 1000
|
||||
renderType: Text.QtRendering
|
||||
background: Rectangle {
|
||||
color: "#222222"
|
||||
color: config.PasswordFieldBackgroundColor
|
||||
opacity: 0.2
|
||||
border.color: "transparent"
|
||||
border.width: parent.activeFocus ? 2 : 1
|
||||
@@ -353,11 +355,11 @@ Column {
|
||||
when: password.activeFocus
|
||||
PropertyChanges {
|
||||
target: password.background
|
||||
border.color: root.palette.highlight
|
||||
border.color: config.HighlightBorderColor
|
||||
}
|
||||
PropertyChanges {
|
||||
target: password
|
||||
color: root.palette.highlightedText
|
||||
color: Qt.lighter(config.LoginFieldTextColor, 1.15)
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -393,7 +395,7 @@ Column {
|
||||
|
||||
contentItem: Text {
|
||||
text: parent.text
|
||||
color: root.palette.mid
|
||||
color: config.LoginButtonTextColor
|
||||
font.pointSize: root.font.pointSize
|
||||
font.family: root.font.family
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -403,7 +405,7 @@ Column {
|
||||
|
||||
background: Rectangle {
|
||||
id: buttonBackground
|
||||
color: "white"
|
||||
color: config.LoginButtonBackgroundColor
|
||||
opacity: 0.2
|
||||
radius: config.RoundCorners || 0
|
||||
}
|
||||
@@ -414,7 +416,7 @@ Column {
|
||||
when: loginButton.down
|
||||
PropertyChanges {
|
||||
target: buttonBackground
|
||||
color: Qt.darker(root.palette.link, 1.1)
|
||||
color: Qt.darker(config.LoginButtonBackgroundColor, 1.1)
|
||||
opacity: 1
|
||||
}
|
||||
PropertyChanges {
|
||||
@@ -426,7 +428,7 @@ Column {
|
||||
when: loginButton.hovered
|
||||
PropertyChanges {
|
||||
target: buttonBackground
|
||||
color: Qt.lighter(root.palette.link, 1.15)
|
||||
color: Qt.lighter(config.LoginButtonBackgroundColor, 1.15)
|
||||
opacity: 1
|
||||
}
|
||||
PropertyChanges {
|
||||
@@ -439,7 +441,7 @@ Column {
|
||||
when: loginButton.activeFocus
|
||||
PropertyChanges {
|
||||
target: buttonBackground
|
||||
color: Qt.lighter(root.palette.link, 1.2)
|
||||
color: Qt.lighter(config.LoginButtonBackgroundColor, 1.2)
|
||||
opacity: 1
|
||||
}
|
||||
PropertyChanges {
|
||||
@@ -452,7 +454,7 @@ Column {
|
||||
when: loginButton.enabled
|
||||
PropertyChanges {
|
||||
target: buttonBackground;
|
||||
color: root.palette.link;
|
||||
color: config.LoginButtonBackgroundColor;
|
||||
opacity: 1
|
||||
}
|
||||
PropertyChanges {
|
||||
|
||||
@@ -51,13 +51,13 @@ Item {
|
||||
text: model.name
|
||||
font.pointSize: root.font.pointSize * 0.8
|
||||
font.family: root.font.family
|
||||
color: selectSession.highlightedIndex === index ? root.palette.highlight.hslLightness >= 0.7 ? "#444444" : "white" : root.palette.window.hslLightness >= 0.8 ? root.palette.highlight.hslLightness >= 0.8 ? "#444444" : root.palette.highlight : "white"
|
||||
color: config.DropdownTextColor
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
highlighted: parent.highlightedIndex === index
|
||||
background: Rectangle {
|
||||
color: selectSession.highlightedIndex === index ? root.palette.highlight : "transparent"
|
||||
color: selectSession.highlightedIndex === index ? config.DropdownSelectedBackgroundColor : "transparent"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ Item {
|
||||
contentItem: Text {
|
||||
id: displayedItem
|
||||
text: (config.TranslateSessionSelection || "Session") + " (" + selectSession.currentText + ")"
|
||||
color: root.palette.text
|
||||
color: config.SessionButtonTextColor
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pointSize: root.font.pointSize * 0.8
|
||||
font.family: root.font.family
|
||||
@@ -105,7 +105,7 @@ Item {
|
||||
|
||||
background: Rectangle {
|
||||
radius: config.RoundCorners / 2
|
||||
color: root.palette.alternateBase
|
||||
color: config.DropdownBackgroundColor
|
||||
layer.enabled: true
|
||||
}
|
||||
|
||||
@@ -120,11 +120,11 @@ Item {
|
||||
when: selectSession.down
|
||||
PropertyChanges {
|
||||
target: displayedItem
|
||||
color: Qt.darker(root.palette.toolTipBase, 1.1)
|
||||
color: Qt.darker(config.HoverSessionButtonTextColor, 1.1)
|
||||
}
|
||||
PropertyChanges {
|
||||
target: selectSession.background
|
||||
border.color: Qt.darker(root.palette.toolTipBase, 1.1)
|
||||
border.color: Qt.darker(config.HoverSessionButtonTextColor, 1.1)
|
||||
}
|
||||
},
|
||||
State {
|
||||
@@ -132,11 +132,11 @@ Item {
|
||||
when: selectSession.hovered
|
||||
PropertyChanges {
|
||||
target: displayedItem
|
||||
color: Qt.lighter(root.palette.toolTipBase, 1.1)
|
||||
color: Qt.lighter(config.HoverSessionButtonTextColor, 1.1)
|
||||
}
|
||||
PropertyChanges {
|
||||
target: selectSession.background
|
||||
border.color: Qt.lighter(root.palette.toolTipBase, 1.1)
|
||||
border.color: Qt.lighter(config.HoverSessionButtonTextColor, 1.1)
|
||||
}
|
||||
},
|
||||
State {
|
||||
@@ -144,11 +144,11 @@ Item {
|
||||
when: selectSession.visualFocus
|
||||
PropertyChanges {
|
||||
target: displayedItem
|
||||
color: root.palette.toolTipBase
|
||||
color: config.HoverSessionButtonTextColor
|
||||
}
|
||||
PropertyChanges {
|
||||
target: selectSession.background
|
||||
border.color: root.palette.toolTipBase
|
||||
border.color: config.HoverSessionButtonTextColor
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -30,11 +30,11 @@ RowLayout {
|
||||
icon.source: modelData ? Qt.resolvedUrl("../Assets/" + modelData[0] + ".svg") : ""
|
||||
icon.height: 2 * Math.round((root.font.pointSize * 3) / 2)
|
||||
icon.width: 2 * Math.round((root.font.pointSize * 3) / 2)
|
||||
icon.color: config.SystemButtonsIconColor
|
||||
icon.color: config.SystemButtonsIconsColor
|
||||
display: AbstractButton.TextUnderIcon
|
||||
visible: config.HideSystemButtons != "true" && modelData[2]
|
||||
hoverEnabled: true
|
||||
palette.buttonText: config.SystemButtonsIconColor
|
||||
palette.buttonText: config.SystemButtonsIconsColor
|
||||
background: Rectangle {
|
||||
height: 2
|
||||
color: "transparent"
|
||||
@@ -57,13 +57,13 @@ RowLayout {
|
||||
when: parent.children[index].down
|
||||
PropertyChanges {
|
||||
target: parent.children[index]
|
||||
icon.color: root.palette.highlight
|
||||
palette.buttonText: Qt.darker(root.palette.highlight, 1.1)
|
||||
icon.color: root.palette.buttonText
|
||||
palette.buttonText: Qt.darker(root.palette.buttonText, 1.1)
|
||||
}
|
||||
PropertyChanges {
|
||||
target: parent.children[index].background
|
||||
icon.color: root.palette.highlight
|
||||
border.color: Qt.darker(root.palette.highlight, 1.1)
|
||||
icon.color: root.palette.buttonText
|
||||
border.color: Qt.darker(root.palette.buttonText, 1.1)
|
||||
}
|
||||
},
|
||||
State {
|
||||
@@ -71,13 +71,13 @@ RowLayout {
|
||||
when: parent.children[index].hovered
|
||||
PropertyChanges {
|
||||
target: parent.children[index]
|
||||
icon.color: root.palette.highlight
|
||||
palette.buttonText: Qt.lighter(root.palette.highlight, 1.1)
|
||||
icon.color: root.palette.buttonText
|
||||
palette.buttonText: Qt.lighter(root.palette.buttonText, 1.1)
|
||||
}
|
||||
PropertyChanges {
|
||||
target: parent.children[index].background
|
||||
icon.color: root.palette.highlight
|
||||
border.color: Qt.lighter(root.palette.highlight, 1.1)
|
||||
icon.color: root.palette.buttonText
|
||||
border.color: Qt.lighter(root.palette.buttonText, 1.1)
|
||||
}
|
||||
},
|
||||
State {
|
||||
@@ -85,13 +85,13 @@ RowLayout {
|
||||
when: parent.children[index].activeFocus
|
||||
PropertyChanges {
|
||||
target: parent.children[index]
|
||||
icon.color: root.palette.highlight
|
||||
palette.buttonText: root.palette.highlight
|
||||
icon.color: root.palette.buttonText
|
||||
palette.buttonText: root.palette.buttonText
|
||||
}
|
||||
PropertyChanges {
|
||||
target: parent.children[index].background
|
||||
icon.color: root.palette.highlight
|
||||
border.color: root.palette.highlight
|
||||
icon.color: root.palette.buttonText
|
||||
border.color: root.palette.buttonText
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -109,4 +109,4 @@ RowLayout {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user