From 9673078a750ecb62d7693b42ed5bab1aeccf65c1 Mon Sep 17 00:00:00 2001 From: bbedward Date: Mon, 15 Dec 2025 16:30:35 -0500 Subject: [PATCH] fix gui --- .../Modules/Settings/DisplayConfigTab.qml | 47 +++++++------------ quickshell/Modules/Settings/KeybindsTab.qml | 39 +++++---------- 2 files changed, 29 insertions(+), 57 deletions(-) diff --git a/quickshell/Modules/Settings/DisplayConfigTab.qml b/quickshell/Modules/Settings/DisplayConfigTab.qml index 71b8bda9..9a303863 100644 --- a/quickshell/Modules/Settings/DisplayConfigTab.qml +++ b/quickshell/Modules/Settings/DisplayConfigTab.qml @@ -241,7 +241,7 @@ Item { configFile: configDir + "/hypr/hyprland.conf", outputsFile: configDir + "/hypr/dms/outputs.conf", grepPattern: 'source.*dms/outputs.conf', - includeLine: "source = ~/.config/hypr/dms/outputs.conf" + includeLine: "source = ./dms/outputs.conf" } case "dwl": return { @@ -297,8 +297,10 @@ Item { `echo '${paths.includeLine}' >> "${paths.configFile}"; fi` ], (output, exitCode) => { fixingInclude = false - if (exitCode === 0) - checkIncludeStatus() + if (exitCode !== 0) + return + checkIncludeStatus() + WlrOutputService.requestState() }) } @@ -974,36 +976,21 @@ Item { } } - Rectangle { + DankButton { id: includeFixButton - width: includeFixButtonText.implicitWidth + Theme.spacingL * 2 - height: Math.round(Theme.fontSizeMedium * 2.5) - radius: Theme.cornerRadius visible: includeWarningBox.showError || includeWarningBox.showSetup - color: root.fixingInclude ? Theme.withAlpha(Theme.error, 0.6) : Theme.error + text: { + if (root.fixingInclude) + return I18n.tr("Fixing...") + if (includeWarningBox.showSetup) + return I18n.tr("Setup") + return I18n.tr("Fix Now") + } + backgroundColor: Theme.primary + textColor: Theme.primaryText + enabled: !root.fixingInclude anchors.verticalCenter: parent.verticalCenter - - StyledText { - id: includeFixButtonText - text: { - if (root.fixingInclude) - return I18n.tr("Fixing...") - if (includeWarningBox.showSetup) - return I18n.tr("Setup") - return I18n.tr("Fix Now") - } - font.pixelSize: Theme.fontSizeSmall - font.weight: Font.Medium - color: Theme.surface - anchors.centerIn: parent - } - - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - enabled: !root.fixingInclude - onClicked: root.fixOutputsInclude() - } + onClicked: root.fixOutputsInclude() } } } diff --git a/quickshell/Modules/Settings/KeybindsTab.qml b/quickshell/Modules/Settings/KeybindsTab.qml index 45ffa93e..ad35caed 100644 --- a/quickshell/Modules/Settings/KeybindsTab.qml +++ b/quickshell/Modules/Settings/KeybindsTab.qml @@ -328,36 +328,21 @@ Item { } } - Rectangle { + DankButton { id: fixButton - width: fixButtonText.implicitWidth + Theme.spacingL * 2 - height: Math.round(Theme.fontSizeMedium * 2.5) - radius: Theme.cornerRadius visible: warningBox.showError || warningBox.showSetup - color: KeybindsService.fixing ? Theme.withAlpha(Theme.error, 0.6) : Theme.error + text: { + if (KeybindsService.fixing) + return I18n.tr("Fixing...") + if (warningBox.showSetup) + return I18n.tr("Setup") + return I18n.tr("Fix Now") + } + backgroundColor: Theme.primary + textColor: Theme.primaryText + enabled: !KeybindsService.fixing anchors.verticalCenter: parent.verticalCenter - - StyledText { - id: fixButtonText - text: { - if (KeybindsService.fixing) - return I18n.tr("Fixing..."); - if (warningBox.showSetup) - return I18n.tr("Setup"); - return I18n.tr("Fix Now"); - } - font.pixelSize: Theme.fontSizeSmall - font.weight: Font.Medium - color: Theme.surface - anchors.centerIn: parent - } - - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - enabled: !KeybindsService.fixing - onClicked: KeybindsService.fixDmsBindsInclude() - } + onClicked: KeybindsService.fixDmsBindsInclude() } } }