From 0bbf279e5ece83756f1463081a1ab6754721085e Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 27 Jun 2024 12:22:53 +1000 Subject: Add a button to shuffle+play the current view --- lua/browser.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lua/browser.lua') diff --git a/lua/browser.lua b/lua/browser.lua index 7ea8e240..ce0f7978 100644 --- a/lua/browser.lua +++ b/lua/browser.lua @@ -58,7 +58,7 @@ return screen:new{ flex = { flex_direction = "row", flex_wrap = "wrap", - justify_content = "flex-end", + justify_content = "center", align_items = "center", align_content = "center" }, @@ -72,6 +72,14 @@ return screen:new{ queue.add(original_iterator) playback.playing:set(true) end) + local shuffle_play = widgets.IconBtn(buttons, "//lua/img/shuffleplay.png", "Shuffle") + shuffle_play:onClicked(function() + queue.clear() + queue.random:set(true) + queue.add(original_iterator) + playback.playing:set(true) + backstack.push(playing:new()) + end) -- enqueue:add_flag(lvgl.FLAG.HIDDEN) local play = widgets.IconBtn(buttons, "//lua/img/play_small.png", "Play") play:onClicked(function() -- cgit v1.2.3