mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
LibGUI: Shrink the default selection rect of TreeView items
Instead of filling the whole row with selection color, only fill behind the text. This gives a snugger, more focused appearance. For embedders that want the entire row to get filled with the selection color when selected, they can opt in to the old behavior by calling TreeView::set_should_fill_selected_rows(). This is used by Profiler.
This commit is contained in:
parent
df98c9ebbe
commit
0391806eec
3 changed files with 23 additions and 6 deletions
|
@ -92,6 +92,7 @@ int main(int argc, char** argv)
|
|||
auto& bottom_splitter = main_widget.add<GUI::VerticalSplitter>();
|
||||
|
||||
auto& tree_view = bottom_splitter.add<GUI::TreeView>();
|
||||
tree_view.set_should_fill_selected_rows(true);
|
||||
tree_view.set_column_headers_visible(true);
|
||||
tree_view.set_model(profile->model());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue