mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 23:28:12 +00:00
LibGUI: Move selection behavior from TableView up to AbstractView
Let's make SelectionBehavior a view concept where views can either select individual items (row, index) or whole rows. Maybe some day we'll do whole columns, but I don't think we need that now.
This commit is contained in:
parent
c8fb00fe4d
commit
f0138fcb25
5 changed files with 13 additions and 15 deletions
|
@ -148,7 +148,7 @@ SpreadsheetView::SpreadsheetView(Sheet& sheet)
|
|||
set_layout<GUI::VerticalBoxLayout>().set_margins({ 2, 2, 2, 2 });
|
||||
m_table_view = add<InfinitelyScrollableTableView>();
|
||||
m_table_view->set_grid_style(GUI::TableView::GridStyle::Both);
|
||||
m_table_view->set_cursor_style(GUI::TableView::CursorStyle::Item);
|
||||
m_table_view->set_selection_behavior(GUI::AbstractView::SelectionBehavior::SelectItems);
|
||||
m_table_view->set_edit_triggers(GUI::AbstractView::EditTrigger::EditKeyPressed | GUI::AbstractView::AnyKeyPressed | GUI::AbstractView::DoubleClicked);
|
||||
m_table_view->set_tab_key_navigation_enabled(true);
|
||||
m_table_view->row_header().set_visible(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue