From 1b22c771f475f20afd9f7b2d429620a52a1f8728 Mon Sep 17 00:00:00 2001 From: rope Date: Fri, 12 Jun 2026 19:21:53 +0100 Subject: [PATCH] quickshell: align battery row to baseline; session icons computed-bright, filled when selected Co-Authored-By: Claude Fable 5 --- settings/quickshell.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/settings/quickshell.nix b/settings/quickshell.nix index a625bc4..13eeb57 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -635,14 +635,19 @@ in Text { anchors.centerIn: parent text: sessBtn.modelData.icon + // Qt.lighter: the generated palette's base07 is + // nearly identical to base05, so brightness must + // be computed, not picked from a slot color: sessBtn.modelData.danger && sessionMenu.selIdx === sessBtn.index - ? Theme.base08 : Theme.base07 + ? Theme.base08 : Qt.lighter(Theme.base07, 1.2) Behavior on color { ColorAnimation { duration: 120 } } font.family: Theme.iconFont font.pixelSize: 20 // Thicken the variable font's strokes — outlined - // Material Symbols read dim at default weight + // Material Symbols read dim at default weight — + // and render the selected icon filled font.weight: 600 + font.variableAxes: { "FILL": sessionMenu.selIdx === sessBtn.index ? 1.0 : 0.0 } } MouseArea { @@ -1095,8 +1100,12 @@ in anchors.verticalCenter: parent.verticalCenter spacing: 4 + // Explicit vertical centering: Rows top-align by + // default, and the icon font's taller line metrics + // would push the text off the shared baseline. Text { id: batteryText + anchors.verticalCenter: parent.verticalCenter text: batteryWidget.batteryLevel + "%" color: batteryWidget.batteryLevel <= 15 ? Theme.base08 : batteryWidget.batteryLevel <= 30 ? Theme.base0A @@ -1107,6 +1116,7 @@ in Text { id: batteryIconText + anchors.verticalCenter: parent.verticalCenter text: batteryWidget.batteryIcon color: batteryWidget.batteryLevel <= 15 ? Theme.base08 : batteryWidget.batteryLevel <= 30 ? Theme.base0A