Clean up: Removed import version specifiers, deleted redundant code, and fixed a bug with form positioning and blur.

This commit is contained in:
Keyitdev
2026-07-16 23:53:28 +02:00
parent 07b64f0781
commit ac297db891
8 changed files with 61 additions and 70 deletions
+11 -7
View File
@@ -3,9 +3,9 @@
// Based on https://github.com/MarianArlt/sddm-sugar-dark
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
RowLayout {
spacing: rootFontSize
@@ -13,7 +13,6 @@ RowLayout {
property var reboot: ["Reboot", config.TranslateReboot || textConstants.reboot, sddm.canReboot]
property var suspend: ["Suspend", config.TranslateSuspend || textConstants.suspend, sddm.canSuspend]
property var hibernate: ["Hibernate", config.TranslateHibernate || textConstants.hibernate, sddm.canHibernate]
property ComboBox exposedSession
Repeater {
id: systemButtons
@@ -23,7 +22,7 @@ RowLayout {
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
text: modelData[1]
font.pixelSize: rootFontSize * 1.06
icon.source: modelData ? Qt.resolvedUrl("../Assets/" + modelData[0] + ".svg") : ""
icon.source: Qt.resolvedUrl("../Assets/" + modelData[0] + ".svg")
icon.height: 2 * Math.round((rootFontSize * 3) / 2)
icon.width: 2 * Math.round((rootFontSize * 3) / 2)
icon.color: config.SystemButtonsIconsColor
@@ -31,7 +30,7 @@ RowLayout {
display: AbstractButton.TextUnderIcon
spacing: rootScaleUnit * 6
padding: rootScaleUnit * 8
visible: config.HideSystemButtons != "true" && (config.BypassSystemButtonsChecks == "true" ? 1 : modelData[2])
visible: config.ShowSystemButtons == "true" && (config.BypassSystemButtonsChecks == "true" || modelData[2])
hoverEnabled: true
background: Rectangle {
height: rootScaleUnit * 2
@@ -41,7 +40,12 @@ RowLayout {
Keys.onReturnPressed: clicked()
onClicked: {
parent.forceActiveFocus()
index == 0 ? sddm.powerOff() : index == 1 ? sddm.reboot() : index == 2 ? sddm.suspend() : sddm.hibernate()
switch (index) {
case 0: sddm.powerOff(); break
case 1: sddm.reboot(); break
case 2: sddm.suspend(); break
default: sddm.hibernate()
}
}
KeyNavigation.left: index > 0 ? parent.children[index-1] : null
states: [