From 436b8eb241a297ed582be4233ae50dc619f80899 Mon Sep 17 00:00:00 2001 From: Ksaper Date: Sat, 4 Mar 2023 02:01:56 +0200 Subject: [PATCH] Use the correct methods for scrolling with the mouse wheel depending on the grid orientation --- widget/app_launcher/init.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/widget/app_launcher/init.lua b/widget/app_launcher/init.lua index 0bfa5a3..3abfd91 100644 --- a/widget/app_launcher/init.lua +++ b/widget/app_launcher/init.lua @@ -381,9 +381,17 @@ local function build_widget(self) self:get_grid():connect_signal("button::press", function(_, lx, ly, button, mods, find_widgets_result) if button == 4 then - self:scroll_up() + if self:get_grid():get_orientation() == "horizontal" then + self:scroll_up() + else + self:scroll_left() + end elseif button == 5 then - self:scroll_down() + if self:get_grid():get_orientation() == "horizontal" then + self:scroll_down() + else + self:scroll_right() + end end end)