summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-12-17 00:49:42 +0100
committerAndreas Kling <kling@serenityos.org>2020-12-17 00:54:58 +0100
commitf0138fcb25cbcd865cb4514bb60ab278a93f9f09 (patch)
tree02c7dfea759ee1814278ff4202b6125d56b3af7f /Applications
parentc8fb00fe4d99e16816871ed96f0fcfd758529e0f (diff)
downloadserenity-f0138fcb25cbcd865cb4514bb60ab278a93f9f09.zip
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.
Diffstat (limited to 'Applications')
-rw-r--r--Applications/Spreadsheet/SpreadsheetView.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Applications/Spreadsheet/SpreadsheetView.cpp b/Applications/Spreadsheet/SpreadsheetView.cpp
index 4eef78dbe3..9bb417f60f 100644
--- a/Applications/Spreadsheet/SpreadsheetView.cpp
+++ b/Applications/Spreadsheet/SpreadsheetView.cpp
@@ -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);