summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-10-16 19:04:14 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-10-16 19:04:14 +0300
commit3d723de1022d2fdeccb9bae6f934e6936445ef21 (patch)
tree54ff4c5512b0c80b74279a44ad5a552315434c68 /src/ui
parentabf2be6771d55063044df8efe8bb5c02183c1f7d (diff)
Player: Hide volume slider after 3 sec idle time
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/documentwidget.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 1a7bf4a4..85c17a5b 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -460,7 +460,12 @@ static void animatePlayingAudio_DocumentWidget_(void *widget) {
460 if (document_App() != d) return; 460 if (document_App() != d) return;
461 iConstForEach(PtrArray, i, &d->visiblePlayers) { 461 iConstForEach(PtrArray, i, &d->visiblePlayers) {
462 const iGmRun *run = i.ptr; 462 const iGmRun *run = i.ptr;
463 iPlayer *plr = audioPlayer_Media(media_GmDocument(d->doc), run->audioId); 463 iPlayer * plr = audioPlayer_Media(media_GmDocument(d->doc), run->audioId);
464 if (idleTimeMs_Player(plr) > 3000 && ~flags_Player(plr) & volumeGrabbed_PlayerFlag &&
465 flags_Player(plr) & adjustingVolume_PlayerFlag) {
466 setFlags_Player(plr, adjustingVolume_PlayerFlag, iFalse);
467 refresh_Widget(d);
468 }
464 if (isStarted_Player(plr) && !isPaused_Player(plr)) { 469 if (isStarted_Player(plr) && !isPaused_Player(plr)) {
465 refresh_Widget(d); 470 refresh_Widget(d);
466 addTicker_App(animatePlayingAudio_DocumentWidget_, d); 471 addTicker_App(animatePlayingAudio_DocumentWidget_, d);