mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 10:41:30 +00:00
LibGUI: Fix IconView selection with FlowDirection::TopToBottom
While iterating the items contained by the rubberband we need to skip the correct number of items either vertically or horizontally, depending on which direction the items flow. Fixes #5993
This commit is contained in:
parent
497c4c3858
commit
ee3ac88c2d
Notes:
sideshowbarker
2024-07-18 20:59:16 +09:00
Author: https://github.com/tomuta
Commit: ee3ac88c2d
Pull-request: https://github.com/SerenityOS/serenity/pull/6001
Issue: https://github.com/SerenityOS/serenity/issues/5993
1 changed files with 1 additions and 1 deletions
|
@ -820,7 +820,7 @@ inline IterationDecision IconView::for_each_item_intersecting_rect(const Gfx::In
|
|||
return decision;
|
||||
}
|
||||
}
|
||||
item_index += m_visual_column_count;
|
||||
item_index += (m_flow_direction == FlowDirection::LeftToRight) ? m_visual_column_count : m_visual_row_count;
|
||||
};
|
||||
|
||||
return IterationDecision::Continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue