Commit graph

10 commits

Author SHA1 Message Date
remyabel
d8daa08359 GTreeView: Prevent doubleclick with right mouse button (#868)
This follows user expectations and prevents interference with context menu
handling.
2019-12-10 10:24:14 +01:00
Andreas Kling
812ee330e6 GTreeView: Make it possible to multi-select with the Ctrl modifier 2019-11-11 22:20:02 +01:00
Andreas Kling
3ef287eb9f GTreeView: Always repaint in response to did_update_model()
This could definitely be more efficient, but this is more correct than
doing nothing at all. :^)
2019-11-11 22:20:02 +01:00
Andreas Kling
29b2117564 LibGUI: Make GTreeView fire the on_selection hook
GTreeView was forgetting to call to base in did_update_selection().
This prevented GAbstractView from firing the on_selection hook and we
ended up with only the on_selection_change hook firing.
2019-11-09 11:57:08 +01:00
Andreas Kling
64b1e9deec GTreeView: Make double-clicking toggle openable items 2019-09-07 21:45:06 +02:00
Andreas Kling
56c360591c GTreeView: Switch to using GModelSelection
We don't support multi-select in GTreeView yet. Some day though :^)
2019-09-07 20:15:33 +02:00
Andreas Kling
7a906ab539 LibGUI: Teach GScrollableWidget how to hide unnecessary scrollbars
This is now an opt-in mode enabled by calling:

    should_hide_unnecessary_scrollbars(true)

This patch enables the mode for GTreeView and GTableView. :^)
2019-09-05 21:37:15 +02:00
Andreas Kling
5c7bb09a73 GTreeView: Support multiple root-level items
Previously it was only possible to have a single root-level item in a
GTreeView. This was an oversight and I didn't realize it because this
code was only ever used in the FileManager, which has one root ("/").

Also factored out item toggling into a separate function, and increase
the base indentation level so that root items can be toggled as well.

Finally, let the user toggle the selected item with the spacebar. :^)
2019-08-18 10:17:00 +02:00
Conrad Pankoff
6b5fbad250 LibGUI: Simplify GTreeView ancestor traversal 2019-07-31 16:38:10 +02:00
Andreas Kling
04b9dc2d30 Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch
moves the Lib*/ directories into Libraries/.
2019-07-04 16:16:50 +02:00
Renamed from LibGUI/GTreeView.cpp (Browse further)