small gui changes

This commit is contained in:
2026-05-12 16:15:24 +02:00
parent a6318d7a2f
commit fccf019fe7
3 changed files with 36 additions and 7 deletions
+17 -6
View File
@@ -176,12 +176,23 @@
(dbg-rktplayer "state: ~a" st)
(unless (eq? st state)
(dbg-rktplayer "Changing to state ~a" st)
(unless (eq? state #f) ; Prevent setting src twice very fast
(if (eq? st 'playing)
(set-play-button "buttons/pause.svg")
(set-play-button "buttons/play.svg")
)
)
(let ((el (send this element 'paused)))
(unless (eq? state #f) ; Prevent setting src twice very fast
(cond ((or (eq? st 'playing) (eq? st 'play))
(set-play-button "buttons/pause.svg")
(send el set-innerHTML! '(span (tr "playing"))))
((eq? st 'stopped)
(set-play-button "buttons/play.svg")
(send el set-innerHTML! '(span (tr "stopped"))))
((eq? st 'pauzed)
(set-play-button "buttons/play.svg")
(send el set-innerHTML! '(span ((class "blink")) (tr "paused"))))
(else
(warn-rktplayer "Unkown state for update-state ~a" st)
(send el set-innerHTML! (list 'span
'((class "blink"))
(format "~a: ~a" (tr "Unknown state") st))))
)))
(set! state st)
)
)