mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:47:35 +00:00
LibGUI: Default TreeView to SelectionBehavior::SelectItems
AbstractTableView (which TreeView inherits from) sets the selection behavior of the view to SelectRows. This is not how TreeViews are used in most of the system, and TreeView::paint_event actually always draws with the assumption of selecting individual items. This commit defines the expected selection behavior for TreeViews. Users of TreeView can still override this via TreeView::set_selection_behavior.
This commit is contained in:
parent
e1ed1d9176
commit
8c1a6a8436
1 changed files with 1 additions and 0 deletions
|
@ -34,6 +34,7 @@ TreeView::MetadataForIndex& TreeView::ensure_metadata_for_index(const ModelIndex
|
|||
|
||||
TreeView::TreeView()
|
||||
{
|
||||
set_selection_behavior(SelectionBehavior::SelectItems);
|
||||
set_fill_with_background_color(true);
|
||||
set_background_role(ColorRole::Base);
|
||||
set_foreground_role(ColorRole::BaseText);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue