mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00:00
SystemMonitor: Shrink oversized GroupBox margins
Now that GroupBox reports accurate content margins, we don't need to account for the title height in internal layout margins.
This commit is contained in:
parent
6fe37a1e52
commit
ea8c6e796f
2 changed files with 7 additions and 7 deletions
|
@ -32,7 +32,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget()
|
||||||
|
|
||||||
auto& adapters_group_box = add<GUI::GroupBox>("Adapters");
|
auto& adapters_group_box = add<GUI::GroupBox>("Adapters");
|
||||||
adapters_group_box.set_layout<GUI::VerticalBoxLayout>();
|
adapters_group_box.set_layout<GUI::VerticalBoxLayout>();
|
||||||
adapters_group_box.layout()->set_margins({ 16, 6, 6 });
|
adapters_group_box.layout()->set_margins(6);
|
||||||
adapters_group_box.set_fixed_height(120);
|
adapters_group_box.set_fixed_height(120);
|
||||||
|
|
||||||
m_adapter_table_view = adapters_group_box.add<GUI::TableView>();
|
m_adapter_table_view = adapters_group_box.add<GUI::TableView>();
|
||||||
|
@ -69,7 +69,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget()
|
||||||
|
|
||||||
auto& tcp_sockets_group_box = add<GUI::GroupBox>("TCP Sockets");
|
auto& tcp_sockets_group_box = add<GUI::GroupBox>("TCP Sockets");
|
||||||
tcp_sockets_group_box.set_layout<GUI::VerticalBoxLayout>();
|
tcp_sockets_group_box.set_layout<GUI::VerticalBoxLayout>();
|
||||||
tcp_sockets_group_box.layout()->set_margins({ 16, 6, 6 });
|
tcp_sockets_group_box.layout()->set_margins(6);
|
||||||
|
|
||||||
m_tcp_socket_table_view = tcp_sockets_group_box.add<GUI::TableView>();
|
m_tcp_socket_table_view = tcp_sockets_group_box.add<GUI::TableView>();
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget()
|
||||||
|
|
||||||
auto& udp_sockets_group_box = add<GUI::GroupBox>("UDP Sockets");
|
auto& udp_sockets_group_box = add<GUI::GroupBox>("UDP Sockets");
|
||||||
udp_sockets_group_box.set_layout<GUI::VerticalBoxLayout>();
|
udp_sockets_group_box.set_layout<GUI::VerticalBoxLayout>();
|
||||||
udp_sockets_group_box.layout()->set_margins({ 16, 6, 6 });
|
udp_sockets_group_box.layout()->set_margins(6);
|
||||||
|
|
||||||
m_udp_socket_table_view = udp_sockets_group_box.add<GUI::TableView>();
|
m_udp_socket_table_view = udp_sockets_group_box.add<GUI::TableView>();
|
||||||
|
|
||||||
|
|
|
@ -596,7 +596,7 @@ NonnullRefPtr<GUI::Widget> build_hardware_tab()
|
||||||
{
|
{
|
||||||
auto& cpu_group_box = self.add<GUI::GroupBox>("CPUs");
|
auto& cpu_group_box = self.add<GUI::GroupBox>("CPUs");
|
||||||
cpu_group_box.set_layout<GUI::VerticalBoxLayout>();
|
cpu_group_box.set_layout<GUI::VerticalBoxLayout>();
|
||||||
cpu_group_box.layout()->set_margins({ 16, 6, 6 });
|
cpu_group_box.layout()->set_margins(6);
|
||||||
|
|
||||||
Vector<GUI::JsonArrayModel::FieldSpec> processors_field;
|
Vector<GUI::JsonArrayModel::FieldSpec> processors_field;
|
||||||
processors_field.empend("processor", "Processor", Gfx::TextAlignment::CenterRight);
|
processors_field.empend("processor", "Processor", Gfx::TextAlignment::CenterRight);
|
||||||
|
@ -627,7 +627,7 @@ NonnullRefPtr<GUI::Widget> build_hardware_tab()
|
||||||
{
|
{
|
||||||
auto& pci_group_box = self.add<GUI::GroupBox>("PCI devices");
|
auto& pci_group_box = self.add<GUI::GroupBox>("PCI devices");
|
||||||
pci_group_box.set_layout<GUI::VerticalBoxLayout>();
|
pci_group_box.set_layout<GUI::VerticalBoxLayout>();
|
||||||
pci_group_box.layout()->set_margins({ 16, 6, 6 });
|
pci_group_box.layout()->set_margins(6);
|
||||||
|
|
||||||
auto& pci_table_view = pci_group_box.add<GUI::TableView>();
|
auto& pci_table_view = pci_group_box.add<GUI::TableView>();
|
||||||
|
|
||||||
|
@ -693,7 +693,7 @@ NonnullRefPtr<GUI::Widget> build_performance_tab()
|
||||||
|
|
||||||
auto& cpu_graph_group_box = graphs_container->add<GUI::GroupBox>("CPU usage");
|
auto& cpu_graph_group_box = graphs_container->add<GUI::GroupBox>("CPU usage");
|
||||||
cpu_graph_group_box.set_layout<GUI::HorizontalBoxLayout>();
|
cpu_graph_group_box.set_layout<GUI::HorizontalBoxLayout>();
|
||||||
cpu_graph_group_box.layout()->set_margins({ 16, 6, 6 });
|
cpu_graph_group_box.layout()->set_margins(6);
|
||||||
cpu_graph_group_box.set_fixed_height(120);
|
cpu_graph_group_box.set_fixed_height(120);
|
||||||
Vector<GraphWidget&> cpu_graphs;
|
Vector<GraphWidget&> cpu_graphs;
|
||||||
for (size_t i = 0; i < ProcessModel::the().cpus().size(); i++) {
|
for (size_t i = 0; i < ProcessModel::the().cpus().size(); i++) {
|
||||||
|
@ -725,7 +725,7 @@ NonnullRefPtr<GUI::Widget> build_performance_tab()
|
||||||
|
|
||||||
auto& memory_graph_group_box = graphs_container->add<GUI::GroupBox>("Memory usage");
|
auto& memory_graph_group_box = graphs_container->add<GUI::GroupBox>("Memory usage");
|
||||||
memory_graph_group_box.set_layout<GUI::VerticalBoxLayout>();
|
memory_graph_group_box.set_layout<GUI::VerticalBoxLayout>();
|
||||||
memory_graph_group_box.layout()->set_margins({ 16, 6, 6 });
|
memory_graph_group_box.layout()->set_margins(6);
|
||||||
memory_graph_group_box.set_fixed_height(120);
|
memory_graph_group_box.set_fixed_height(120);
|
||||||
auto& memory_graph = memory_graph_group_box.add<GraphWidget>();
|
auto& memory_graph = memory_graph_group_box.add<GraphWidget>();
|
||||||
memory_graph.set_stack_values(true);
|
memory_graph.set_stack_values(true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue