summaryrefslogtreecommitdiff
path: root/Userland/Applications/SystemMonitor
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Applications/SystemMonitor')
-rw-r--r--Userland/Applications/SystemMonitor/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp
index 061388d605..07d3c9708f 100644
--- a/Userland/Applications/SystemMonitor/main.cpp
+++ b/Userland/Applications/SystemMonitor/main.cpp
@@ -670,7 +670,7 @@ NonnullRefPtr<GUI::Widget> build_performance_tab()
auto& cpu_graph_group_box = graphs_container->add<GUI::GroupBox>("CPU usage");
cpu_graph_group_box.set_layout<GUI::VerticalBoxLayout>();
- static constexpr size_t cpu_graphs_per_row = 4;
+ size_t cpu_graphs_per_row = min(4, ProcessModel::the().cpus().size());
auto cpu_graph_rows = ceil_div(ProcessModel::the().cpus().size(), cpu_graphs_per_row);
cpu_graph_group_box.set_fixed_height(120u * cpu_graph_rows);