1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

Fix OSDs disappearing and toast exit anim

This commit is contained in:
bbedward
2025-08-20 11:06:47 -04:00
parent 1f24ad51f8
commit 8c7b72fb6c
5 changed files with 85 additions and 25 deletions

View File

@@ -24,10 +24,6 @@ DankOSD {
}
}
function resetHideTimer() {
if (root.shouldBeVisible)
root.hideTimer.restart()
}
Connections {
target: BrightnessService
@@ -92,10 +88,14 @@ DankOSD {
if (BrightnessService.brightnessAvailable) {
root.brightnessDebounceTimer.pendingValue = newValue
root.brightnessDebounceTimer.restart()
root.resetHideTimer()
resetHideTimer()
}
}
onContainsMouseChanged: {
setChildHovered(containsMouse)
}
onSliderDragFinished: function(finalValue) {
if (BrightnessService.brightnessAvailable) {
root.brightnessDebounceTimer.stop()

View File

@@ -11,10 +11,6 @@ DankOSD {
autoHideInterval: 3000
enableMouseInteraction: true
function resetHideTimer() {
if (root.shouldBeVisible)
root.hideTimer.restart()
}
Connections {
target: AudioService
@@ -62,7 +58,10 @@ DankOSD {
cursorShape: Qt.PointingHandCursor
onClicked: {
AudioService.toggleMute()
root.resetHideTimer()
resetHideTimer()
}
onContainsMouseChanged: {
setChildHovered(containsMouse || volumeSlider.containsMouse)
}
}
}
@@ -88,10 +87,14 @@ DankOSD {
onSliderValueChanged: function(newValue) {
if (AudioService.sink && AudioService.sink.audio) {
AudioService.sink.audio.volume = newValue / 100
root.resetHideTimer()
resetHideTimer()
}
}
onContainsMouseChanged: {
setChildHovered(containsMouse || muteButton.containsMouse)
}
Connections {
target: AudioService.sink && AudioService.sink.audio ? AudioService.sink.audio : null