Keep display scaling options consistent

This commit is contained in:
David Heinemeier Hansson committed 2026-07-23 20:37:25 -07:00
1 parent f20da3f94a
commit 202296324a
5 files changed
+115 -30

No files matched your search

+10 -1
View File
@@ -263,6 +263,15 @@ Panel {
return -1
}
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 ~10–20 points so casual tweaks change the label, while small
// nudges within one band don't.
@@ -781,7 +790,7 @@ Panel {
required property string scaleValue
required property int scaleIndex
text: scaleValue + "x"
text: root.effectiveScale(scaleValue) + "x"
fontSize: Style.font.caption
foreground: root.bar.foreground
fontFamily: root.bar.fontFamily