Use the correct methods for scrolling with the mouse wheel depending on the grid orientation

This commit is contained in:
Ksaper 2023-03-04 02:01:56 +02:00
parent b6518e6e17
commit 436b8eb241
1 changed files with 10 additions and 2 deletions

View File

@ -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)