mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
LibGUI: Move table view headers into their own widget
This patch introduces the HeaderView class, which is a widget that implements the column headers of TableView and TreeView. This greatly simplifies event management in the view implementations and also makes it much easier to eventually implement row headers.
This commit is contained in:
parent
eca6ff353e
commit
44e371635e
16 changed files with 555 additions and 351 deletions
|
@ -180,7 +180,7 @@ int main(int argc, char** argv)
|
|||
process_table_container.layout()->set_spacing(0);
|
||||
|
||||
auto& process_table_view = process_table_container.add<GUI::TableView>();
|
||||
process_table_view.set_headers_visible(true);
|
||||
process_table_view.set_column_headers_visible(true);
|
||||
process_table_view.set_model(GUI::SortingProxyModel::create(ProcessModel::create()));
|
||||
process_table_view.set_key_column_and_sort_order(ProcessModel::Column::CPU, GUI::SortOrder::Descending);
|
||||
process_table_view.model()->update();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue