Fix: Removed useless KeyNavigation and key events. Fixed typos. Cleaned up some code.

This commit is contained in:
Keyitdev
2024-12-30 20:47:31 +01:00
parent 91967fc2d4
commit 8d0c59ded3
8 changed files with 236 additions and 192 deletions
+9 -7
View File
@@ -19,27 +19,30 @@ RowLayout {
property ComboBox exposedSession
Repeater {
id: systemButtons
model: [shutdown, reboot, suspend, hibernate]
RoundButton {
text: modelData[1]
font.pointSize: root.font.pointSize * 0.8
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
Layout.topMargin: root.font.pointSize * 6.5
text: modelData[1]
font.pointSize: root.font.pointSize * 0.8
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.SystemButtonsIconsColor
palette.buttonText: config.SystemButtonsIconsColor
display: AbstractButton.TextUnderIcon
visible: config.HideSystemButtons != "true" && (config.BypassSystemButtonsChecks == "true" ? 1 : modelData[2])
hoverEnabled: true
palette.buttonText: config.SystemButtonsIconsColor
background: Rectangle {
height: 2
color: "transparent"
width: parent.width
color: "transparent"
}
Keys.onReturnPressed: clicked()
@@ -48,7 +51,7 @@ RowLayout {
index == 0 ? sddm.powerOff() : index == 1 ? sddm.reboot() : index == 2 ? sddm.suspend() : sddm.hibernate()
}
KeyNavigation.left: index > 0 ? parent.children[index-1] : null
states: [
State {
name: "pressed"
@@ -78,7 +81,6 @@ RowLayout {
}
}
]
transitions: [
Transition {
PropertyAnimation {