1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

General code cleanups

This commit is contained in:
bbedward
2025-08-02 16:18:12 -04:00
parent 2cf7497324
commit 599118c63e
68 changed files with 102 additions and 1241 deletions

View File

@@ -13,7 +13,7 @@ DankModal {
property string powerConfirmMessage: ""
function executePowerAction(action) {
console.log("Executing power action:", action);
let command = [];
switch (action) {
case "logout":
@@ -30,12 +30,10 @@ DankModal {
break;
}
if (command.length > 0) {
powerActionProcess.command = command;
powerActionProcess.running = true;
Quickshell.execDetached(command);
}
}
// DankModal configuration
visible: powerConfirmVisible
width: 350
height: 160
@@ -45,17 +43,6 @@ DankModal {
powerConfirmVisible = false;
}
Process {
id: powerActionProcess
running: false
onExited: (exitCode) => {
if (exitCode !== 0)
console.error("Power action failed with exit code:", exitCode);
}
}
content: Component {
Item {
anchors.fill: parent
@@ -65,7 +52,6 @@ DankModal {
width: parent.width - Theme.spacingM * 2
spacing: Theme.spacingM
// Title
StyledText {
text: powerConfirmTitle
font.pixelSize: Theme.fontSizeLarge
@@ -84,7 +70,6 @@ DankModal {
horizontalAlignment: Text.AlignHCenter
}
// Message
StyledText {
text: powerConfirmMessage
font.pixelSize: Theme.fontSizeMedium
@@ -98,12 +83,10 @@ DankModal {
height: Theme.spacingS
}
// Buttons
Row {
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.spacingM
// Cancel button
Rectangle {
width: 120
height: 40
@@ -131,7 +114,6 @@ DankModal {
}
// Confirm button
Rectangle {
width: 120
height: 40