summaryrefslogtreecommitdiff
path: root/lua/playing.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/playing.lua')
-rw-r--r--lua/playing.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/lua/playing.lua b/lua/playing.lua
index c6a3f47e..4767e42f 100644
--- a/lua/playing.lua
+++ b/lua/playing.lua
@@ -112,13 +112,17 @@ return function(opts)
}
playlist:Object({ w = 3, h = 1 }) -- spacer
- local scrubber = screen.root:Bar {
+ local scrubber = screen.root:Slider {
w = lvgl.PCT(100),
h = 5,
range = { min = 0, max = 100 },
value = 0,
}
+ scrubber:onevent(lvgl.EVENT.RELEASED, function()
+ playback.position:set(scrubber:value())
+ end)
+
local controls = screen.root:Object {
flex = {
flex_direction = "row",
@@ -182,7 +186,9 @@ return function(opts)
cur_time:set {
text = format_time(pos)
}
- scrubber:set { value = pos }
+ if not scrubber:is_dragged() then
+ scrubber:set { value = pos }
+ end
end),
playback.track:bind(function(track)
if not track then return end