From 097de493bb0516bcb6d291f8f44933acb2b06d4f Mon Sep 17 00:00:00 2001 From: bbedward Date: Thu, 17 Sep 2026 10:33:09 -0400 Subject: [PATCH] displayconfig: fix custom scale option --- .../Settings/DisplayConfig/OutputCard.qml | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/quickshell/Modules/Settings/DisplayConfig/OutputCard.qml b/quickshell/Modules/Settings/DisplayConfig/OutputCard.qml index 0c779e041..2e786a157 100644 --- a/quickshell/Modules/Settings/DisplayConfig/OutputCard.qml +++ b/quickshell/Modules/Settings/DisplayConfig/OutputCard.qml @@ -244,14 +244,13 @@ StyledRect { width: parent.width dropdownWidth: parent.width visible: !scaleContainer.customMode - currentValue: scaleContainer.currentScale options: scaleContainer.scaleOptionsData.labels onValueChanged: value => { if (value === I18n.tr("Custom...")) { - scaleContainer.customMode = true; + currentValue = scaleContainer.currentScale; scaleInput.text = scaleContainer.currentScale; - scaleInput.forceActiveFocus(); - scaleInput.selectAll(); + scaleContainer.customMode = true; + customFocusTimer.restart(); return; } const mapped = scaleContainer.scaleOptionsData.valueByLabel[value]; @@ -259,6 +258,22 @@ StyledRect { } } + Binding { + target: scaleDropdown + property: "currentValue" + value: scaleContainer.currentScale + } + + // the dropdown takes focus back when its menu finishes closing + Timer { + id: customFocusTimer + interval: Theme.shortDuration + 100 + onTriggered: { + scaleInput.forceActiveFocus(); + scaleInput.selectAll(); + } + } + DankTextField { id: scaleInput width: parent.width