diff --git a/settings/quickshell.nix b/settings/quickshell.nix index b8fda94..c2f3e18 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -4214,36 +4214,60 @@ in } } - Column { + // Card body so the OSD reads as a surface, not floating + // marks on the bar. Scales in from slightly small. + Rectangle { anchors.centerIn: parent - spacing: 8 - - // Vertical track — fill grows upward from the bottom. - // PillSlider is horizontal-only, so this is its own - // rather than a rotated instance. - Rectangle { - anchors.horizontalCenter: parent.horizontalCenter - width: 6 - height: 96 - radius: 3 - color: Theme.base02 - - Rectangle { - anchors.bottom: parent.bottom - width: parent.width - height: Math.max(parent.width, - parent.height * Math.max(0, Math.min(1, osdItem.value))) - radius: parent.radius - color: osdItem.fill - Behavior on height { NumberAnimation { duration: 80 } } - } + width: 36 + height: osdCol.height + 2 * Theme.cardPad + radius: Theme.radiusSmall + color: Theme.cardBg + scale: osdItem.shown ? 1 : 0.85 + Behavior on scale { + NumberAnimation { duration: Theme.animMorph; easing.type: Easing.OutExpo } } - SIcon { - anchors.horizontalCenter: parent.horizontalCenter - text: osdItem.icon - color: Theme.base05 - font.pixelSize: 16 + Column { + id: osdCol + anchors.centerIn: parent + spacing: 6 + + SText { + anchors.horizontalCenter: parent.horizontalCenter + text: Math.round(Math.max(0, Math.min(1, osdItem.value)) * 100) + color: Theme.base04 + font.pixelSize: 11 + } + + // Vertical track — fill grows upward from the bottom. + // PillSlider is horizontal-only, so this is its own + // rather than a rotated instance. + Rectangle { + anchors.horizontalCenter: parent.horizontalCenter + width: 12 + height: 96 + radius: 6 + color: Theme.base02 + + Rectangle { + anchors.bottom: parent.bottom + width: parent.width + height: Math.max(parent.width, + parent.height * Math.max(0, Math.min(1, osdItem.value))) + radius: parent.radius + color: osdItem.fill + Behavior on height { + NumberAnimation { duration: 140; easing.type: Easing.OutCubic } + } + } + } + + SIcon { + anchors.horizontalCenter: parent.horizontalCenter + text: osdItem.icon + color: Theme.base05 + font.pixelSize: 16 + } } } }