1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:24:57 +00:00

Browser: Make storage inspector columns sortable

This commit is contained in:
Jelle Raaijmakers 2022-03-30 00:04:47 +02:00 committed by Linus Groh
parent 62fbf282b1
commit 02e2f11380
2 changed files with 6 additions and 1 deletions

View file

@ -26,7 +26,10 @@ StorageWidget::StorageWidget()
m_cookies_table_view = cookies_tab->find_descendant_of_type_named<GUI::TableView>("cookies_tableview");
m_cookies_model = adopt_ref(*new CookiesModel());
m_cookies_table_view->set_model(*m_cookies_model);
m_sorting_model = MUST(GUI::SortingProxyModel::create(*m_cookies_model));
m_sorting_model->set_sort_role(GUI::ModelRole::Display);
m_cookies_table_view->set_model(m_sorting_model);
m_cookies_table_view->set_column_headers_visible(true);
m_cookies_table_view->set_alternating_row_colors(true);
}