fix(quickshell): keep text sharp under zoom and on the lock screen

Native-rendered glyphs are rasterised at rest size, so anything moved
with `scale` stretched a bitmap and came out blurred and stepped.

- Icons render as curves, so their pulse and bump stay smooth.
- The lock face is laid out at uiScale instead of being drawn at
  1080p size and scaled by up to 1.3, and it sits on whole pixels. Its
  native labels now land on the pixel grid.
- The OSD rises into place instead of scaling in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nvrlandClaude Opus 5.5 committed 2026-10-04 21:58:00 +02:00
1 parent f1d16e5175
commit b86e584b02
4 files changed
+76 -61

No files matched your search

+12 -9
View File
@@ -11,15 +11,18 @@ Item {
property string label: ""
property string detail: ""
property color tone: Theme.primaryDim
// The lock face's size factor. The row is laid out at that size rather
// than scaled, so its native text stays sharp.
property real uiScale: 1
implicitHeight: visible ? 26 : 0
implicitHeight: visible ? Math.round(26 * row.uiScale) : 0
Rectangle {
id: dot
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
width: Theme.marker
height: Theme.marker
width: Math.round(Theme.marker * row.uiScale)
height: width
radius: width / 2
color: row.tone
}
@@ -27,24 +30,24 @@ Item {
Text {
id: name
anchors.left: dot.right
anchors.leftMargin: Theme.padS
anchors.leftMargin: Math.round(Theme.padS * row.uiScale)
anchors.verticalCenter: parent.verticalCenter
width: Math.min(implicitWidth, row.width * 0.55)
text: row.label.toUpperCase()
color: Theme.text
elide: Text.ElideRight
font.family: Theme.fontDisplay
font.pixelSize: Theme.fsSmall
font.pixelSize: Math.round(Theme.fsSmall * row.uiScale)
font.weight: Theme.weightDisplay
font.letterSpacing: Theme.tracking
font.letterSpacing: Theme.tracking * row.uiScale
renderType: Text.NativeRendering
}
Rectangle {
anchors.left: name.right
anchors.leftMargin: Theme.padS
anchors.leftMargin: Math.round(Theme.padS * row.uiScale)
anchors.right: value.left
anchors.rightMargin: Theme.padS
anchors.rightMargin: Math.round(Theme.padS * row.uiScale)
anchors.verticalCenter: parent.verticalCenter
height: 1
color: Theme.alpha(Theme.outline, 0.4)
@@ -60,7 +63,7 @@ Item {
elide: Text.ElideRight
horizontalAlignment: Text.AlignRight
font.family: Theme.fontMono
font.pixelSize: Theme.fsMicro
font.pixelSize: Math.round(Theme.fsMicro * row.uiScale)
renderType: Text.NativeRendering
}
}