quickshell: restyle volume/brightness OSD
This commit is contained in:
parent
0fbb8ad0f3
commit
4df4062806
1 changed files with 51 additions and 27 deletions
|
|
@ -4214,18 +4214,39 @@ 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
|
||||
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 }
|
||||
}
|
||||
|
||||
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: 6
|
||||
width: 12
|
||||
height: 96
|
||||
radius: 3
|
||||
radius: 6
|
||||
color: Theme.base02
|
||||
|
||||
Rectangle {
|
||||
|
|
@ -4235,7 +4256,9 @@ in
|
|||
parent.height * Math.max(0, Math.min(1, osdItem.value)))
|
||||
radius: parent.radius
|
||||
color: osdItem.fill
|
||||
Behavior on height { NumberAnimation { duration: 80 } }
|
||||
Behavior on height {
|
||||
NumberAnimation { duration: 140; easing.type: Easing.OutCubic }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4247,6 +4270,7 @@ in
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ── Notification Toast (only on primary screen) ──
|
||||
Item {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue