1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 23:55:07 +00:00

LibGUI: clicking and dragging one item will drag other items in selection

Previously if more than one item was selected clicking on one of
them and dragging would de-select everything that is not the one that
was clicked on. Now, if more than one items are selected and there
is a mousedown it goes into a "mightdrag" state.
The user can then perform a drag, if they don't everything that is not
the item being clicked gets unselected in the mouseup event, mimicking
the previous behavior.
This commit is contained in:
Dov Alperin 2020-01-06 17:58:08 -05:00 committed by Andreas Kling
parent e0c959ea7f
commit 518f469970
2 changed files with 10 additions and 0 deletions

View file

@ -48,6 +48,8 @@ private:
int m_visual_column_count { 0 };
int m_visual_row_count { 0 };
bool m_might_drag { false };
Point m_left_mousedown_position;
Size m_effective_item_size { 80, 80 };