Match display scale highlights to clean scales

This commit is contained in:
David Heinemeier Hansson
2026-07-23 16:48:29 -07:00
parent 534746e05b
commit ed9e68957f
4 changed files with 46 additions and 8 deletions
+10 -1
View File
@@ -246,6 +246,15 @@ Panel {
return Model.normalizeScale(scale)
}
function effectiveScale(scale) {
for (var i = 0; i < displays.length; i++) {
var display = displays[i]
if (display && display.focused)
return Model.cleanScale(scale, display.width, display.height)
}
return normalizeScale(scale)
}
// Playful mood-name for a given brightness percent. Bands intentionally
// span ~1020 points so casual tweaks change the label, while small
// nudges within one band don't.
@@ -771,7 +780,7 @@ Panel {
verticalPadding: Style.spacing.controlPaddingY
bordered: true
active: root.normalizeScale(root.monitorScale) === root.normalizeScale(scaleValue)
active: root.normalizeScale(root.monitorScale) === root.effectiveScale(scaleValue)
hasCursor: root.cursorActive && root.focusSection === "scale" && root.selectedIndex === scaleIndex
onClicked: root.setScale(scaleValue)