1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-27 23:25:08 +00:00

SystemMonitor: Use new-style widget size constraints

This is a lot more expressive in C++ as well, not just in GML. :^)
This commit is contained in:
Andreas Kling 2020-12-29 18:57:29 +01:00
parent ee85713e52
commit 881379e324
3 changed files with 5 additions and 12 deletions

View file

@ -41,8 +41,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget()
auto& adapters_group_box = add<GUI::GroupBox>("Adapters");
adapters_group_box.set_layout<GUI::VerticalBoxLayout>();
adapters_group_box.layout()->set_margins({ 6, 16, 6, 6 });
adapters_group_box.set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
adapters_group_box.set_preferred_size(0, 120);
adapters_group_box.set_fixed_height(120);
m_adapter_table_view = adapters_group_box.add<GUI::TableView>();
@ -61,8 +60,6 @@ NetworkStatisticsWidget::NetworkStatisticsWidget()
auto& sockets_group_box = add<GUI::GroupBox>("Sockets");
sockets_group_box.set_layout<GUI::VerticalBoxLayout>();
sockets_group_box.layout()->set_margins({ 6, 16, 6, 6 });
sockets_group_box.set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fill);
sockets_group_box.set_preferred_size(0, 0);
m_socket_table_view = sockets_group_box.add<GUI::TableView>();