Brightness/VolumeWidget: fix visual issues (#875)

This commit is contained in:
Ly-sec
2025-11-26 12:40:18 +01:00
parent 737bde0a6a
commit 3ef5e169e4
4 changed files with 19 additions and 6 deletions
+5 -2
View File
@@ -23,6 +23,8 @@ Item {
property color customBackgroundColor: Color.transparent
property color customTextIconColor: Color.transparent
readonly property bool hiddenByForceClose: forceClose && !forceOpen
// Effective shown state (true if hovered/animated open or forced)
readonly property bool revealed: !forceClose && (forceOpen || showPill)
@@ -66,8 +68,9 @@ Item {
}
}
width: pillHeight + Math.max(0, pill.width - pillOverlap)
height: pillHeight
width: hiddenByForceClose ? 0 : pillHeight + Math.max(0, pill.width - pillOverlap)
height: hiddenByForceClose ? 0 : pillHeight
visible: !hiddenByForceClose
Connections {
target: root
+5 -2
View File
@@ -24,6 +24,8 @@ Item {
property color customBackgroundColor: Color.transparent
property color customTextIconColor: Color.transparent
readonly property bool hiddenByForceClose: forceClose && !forceOpen
signal shown
signal hidden
signal entered
@@ -75,8 +77,9 @@ Item {
}
// For vertical bars: width is just icon size, height includes pill space
width: buttonSize
height: revealed ? (buttonSize + maxPillHeight - pillOverlap) : buttonSize
width: hiddenByForceClose ? 0 : buttonSize
height: hiddenByForceClose ? 0 : (revealed ? (buttonSize + maxPillHeight - pillOverlap) : buttonSize)
visible: !hiddenByForceClose
Connections {
target: root