From 3a6d35e03c1bdf492a86719440dc3d65d37a1865 Mon Sep 17 00:00:00 2001 From: Vishal Rao Date: Mon, 14 Sep 2026 19:11:14 +0530 Subject: [PATCH 1/4] Add processor and graphics header label titles Be consistent with other sections in the system view viz. memory, network and storage. --- src/Views/SystemView/SystemCPUView.vala | 5 ++++- src/Views/SystemView/SystemGPUView.vala | 4 +++- .../WidgetResource/WidgetResource.vala | 19 ++++++++++++++----- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/Views/SystemView/SystemCPUView.vala b/src/Views/SystemView/SystemCPUView.vala index e8a4e471d..8809a4af1 100644 --- a/src/Views/SystemView/SystemCPUView.vala +++ b/src/Views/SystemView/SystemCPUView.vala @@ -16,7 +16,8 @@ public class Monitor.SystemCPUView : Monitor.WidgetResource { public SystemCPUView (CPU _cpu) { cpu = _cpu; - title = cpu.model_name; + + add_header_info (new Gtk.Label (cpu.model_name)); set_popover_more_info (new SystemCPUInfoPopover (cpu)); @@ -29,6 +30,8 @@ public class Monitor.SystemCPUView : Monitor.WidgetResource { } construct { + title = (_("Processor")); + cpu_temperature_chart = new Chart (1) { height_request = -1 }; diff --git a/src/Views/SystemView/SystemGPUView.vala b/src/Views/SystemView/SystemGPUView.vala index 57f90f66a..4c237d8ae 100644 --- a/src/Views/SystemView/SystemGPUView.vala +++ b/src/Views/SystemView/SystemGPUView.vala @@ -14,6 +14,8 @@ public class Monitor.SystemGPUView : Monitor.WidgetResource { construct { + title = (_("Graphics")); + gpu_vram_percentage_label = new LabelRoundy (_("VRAM")) { margin_top = 2, margin_bottom = 6, @@ -60,7 +62,7 @@ public class Monitor.SystemGPUView : Monitor.WidgetResource { public SystemGPUView (IGPU _gpu) { gpu = _gpu; - title = gpu.name; + add_header_info (new Gtk.Label (gpu.name)); gpu_chart = new Chart (1); gpu_chart.set_serie_color (0, Utils.Colors.get_rgba_color (Utils.Colors.LIME_500)); diff --git a/src/Widgets/WidgetResource/WidgetResource.vala b/src/Widgets/WidgetResource/WidgetResource.vala index 6b21dfb9e..43253a091 100644 --- a/src/Widgets/WidgetResource/WidgetResource.vala +++ b/src/Widgets/WidgetResource/WidgetResource.vala @@ -24,16 +24,20 @@ public class Monitor.WidgetResource : Gtk.Box { private Granite.HeaderLabel _title; private Gtk.Box charts_box; - private Gtk.Box header_box; private Gtk.Overlay main_overlay; private Gtk.Box info_box; private Granite.HeaderLabel main_metric_label; + private Gtk.Grid header_grid; + private Gtk.Label? header_info = null; construct { _title = new Granite.HeaderLabel (Utils.NO_DATA); - header_box = new Gtk.Box (HORIZONTAL, 6); - header_box.append (_title); + header_grid = new Gtk.Grid () { + row_spacing = 0, + column_spacing = 6, + }; + header_grid.attach (_title, 0, 0); var main_metric_title = new Gtk.Label (_("Utilization").up ()); main_metric_title.add_css_class (Granite.CssClass.DIM); @@ -70,10 +74,15 @@ public class Monitor.WidgetResource : Gtk.Box { margin_start = 12; orientation = VERTICAL; - append (header_box); + append (header_grid); append (charts_box); } + public void add_header_info (Gtk.Label label) { + header_grid.attach_next_to (label, _title, Gtk.PositionType.BOTTOM); + header_info = label; + } + public void set_main_chart_overlay (Gtk.Widget widget) { info_box.append (widget); } @@ -97,7 +106,7 @@ public class Monitor.WidgetResource : Gtk.Box { }; button_more_info.add_css_class (Granite.CssClass.CIRCULAR); - header_box.append (button_more_info); + header_grid.attach_next_to (button_more_info, header_info, Gtk.PositionType.RIGHT); } } From d8e35d97aa1e67e98e12e9164fedf9146c9fdc23 Mon Sep 17 00:00:00 2001 From: Vishal Rao Date: Tue, 15 Sep 2026 10:09:18 +0530 Subject: [PATCH 2/4] Revert "Add processor and graphics header label titles" This reverts commit 3a6d35e03c1bdf492a86719440dc3d65d37a1865. --- src/Views/SystemView/SystemCPUView.vala | 5 +---- src/Views/SystemView/SystemGPUView.vala | 4 +--- .../WidgetResource/WidgetResource.vala | 19 +++++-------------- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/src/Views/SystemView/SystemCPUView.vala b/src/Views/SystemView/SystemCPUView.vala index 8809a4af1..e8a4e471d 100644 --- a/src/Views/SystemView/SystemCPUView.vala +++ b/src/Views/SystemView/SystemCPUView.vala @@ -16,8 +16,7 @@ public class Monitor.SystemCPUView : Monitor.WidgetResource { public SystemCPUView (CPU _cpu) { cpu = _cpu; - - add_header_info (new Gtk.Label (cpu.model_name)); + title = cpu.model_name; set_popover_more_info (new SystemCPUInfoPopover (cpu)); @@ -30,8 +29,6 @@ public class Monitor.SystemCPUView : Monitor.WidgetResource { } construct { - title = (_("Processor")); - cpu_temperature_chart = new Chart (1) { height_request = -1 }; diff --git a/src/Views/SystemView/SystemGPUView.vala b/src/Views/SystemView/SystemGPUView.vala index 4c237d8ae..57f90f66a 100644 --- a/src/Views/SystemView/SystemGPUView.vala +++ b/src/Views/SystemView/SystemGPUView.vala @@ -14,8 +14,6 @@ public class Monitor.SystemGPUView : Monitor.WidgetResource { construct { - title = (_("Graphics")); - gpu_vram_percentage_label = new LabelRoundy (_("VRAM")) { margin_top = 2, margin_bottom = 6, @@ -62,7 +60,7 @@ public class Monitor.SystemGPUView : Monitor.WidgetResource { public SystemGPUView (IGPU _gpu) { gpu = _gpu; - add_header_info (new Gtk.Label (gpu.name)); + title = gpu.name; gpu_chart = new Chart (1); gpu_chart.set_serie_color (0, Utils.Colors.get_rgba_color (Utils.Colors.LIME_500)); diff --git a/src/Widgets/WidgetResource/WidgetResource.vala b/src/Widgets/WidgetResource/WidgetResource.vala index 43253a091..6b21dfb9e 100644 --- a/src/Widgets/WidgetResource/WidgetResource.vala +++ b/src/Widgets/WidgetResource/WidgetResource.vala @@ -24,20 +24,16 @@ public class Monitor.WidgetResource : Gtk.Box { private Granite.HeaderLabel _title; private Gtk.Box charts_box; + private Gtk.Box header_box; private Gtk.Overlay main_overlay; private Gtk.Box info_box; private Granite.HeaderLabel main_metric_label; - private Gtk.Grid header_grid; - private Gtk.Label? header_info = null; construct { _title = new Granite.HeaderLabel (Utils.NO_DATA); - header_grid = new Gtk.Grid () { - row_spacing = 0, - column_spacing = 6, - }; - header_grid.attach (_title, 0, 0); + header_box = new Gtk.Box (HORIZONTAL, 6); + header_box.append (_title); var main_metric_title = new Gtk.Label (_("Utilization").up ()); main_metric_title.add_css_class (Granite.CssClass.DIM); @@ -74,15 +70,10 @@ public class Monitor.WidgetResource : Gtk.Box { margin_start = 12; orientation = VERTICAL; - append (header_grid); + append (header_box); append (charts_box); } - public void add_header_info (Gtk.Label label) { - header_grid.attach_next_to (label, _title, Gtk.PositionType.BOTTOM); - header_info = label; - } - public void set_main_chart_overlay (Gtk.Widget widget) { info_box.append (widget); } @@ -106,7 +97,7 @@ public class Monitor.WidgetResource : Gtk.Box { }; button_more_info.add_css_class (Granite.CssClass.CIRCULAR); - header_grid.attach_next_to (button_more_info, header_info, Gtk.PositionType.RIGHT); + header_box.append (button_more_info); } } From a615632c1d9df78bd93a627c8a284ab6aad84b1b Mon Sep 17 00:00:00 2001 From: Vishal Rao Date: Tue, 15 Sep 2026 10:12:21 +0530 Subject: [PATCH 3/4] Address review feedback - use granite headerlabel secondary text --- src/Views/SystemView/SystemCPUView.vala | 4 +++- src/Views/SystemView/SystemGPUView.vala | 3 ++- src/Widgets/WidgetResource/WidgetResource.vala | 6 ++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Views/SystemView/SystemCPUView.vala b/src/Views/SystemView/SystemCPUView.vala index e8a4e471d..d8e4e40ad 100644 --- a/src/Views/SystemView/SystemCPUView.vala +++ b/src/Views/SystemView/SystemCPUView.vala @@ -16,7 +16,9 @@ public class Monitor.SystemCPUView : Monitor.WidgetResource { public SystemCPUView (CPU _cpu) { cpu = _cpu; - title = cpu.model_name; + + title = _("Processor"); + description = cpu.model_name; set_popover_more_info (new SystemCPUInfoPopover (cpu)); diff --git a/src/Views/SystemView/SystemGPUView.vala b/src/Views/SystemView/SystemGPUView.vala index 57f90f66a..dedbc9086 100644 --- a/src/Views/SystemView/SystemGPUView.vala +++ b/src/Views/SystemView/SystemGPUView.vala @@ -60,7 +60,8 @@ public class Monitor.SystemGPUView : Monitor.WidgetResource { public SystemGPUView (IGPU _gpu) { gpu = _gpu; - title = gpu.name; + title = (_("Graphics")); + description = gpu.name; gpu_chart = new Chart (1); gpu_chart.set_serie_color (0, Utils.Colors.get_rgba_color (Utils.Colors.LIME_500)); diff --git a/src/Widgets/WidgetResource/WidgetResource.vala b/src/Widgets/WidgetResource/WidgetResource.vala index 6b21dfb9e..3be301131 100644 --- a/src/Widgets/WidgetResource/WidgetResource.vala +++ b/src/Widgets/WidgetResource/WidgetResource.vala @@ -10,6 +10,12 @@ public class Monitor.WidgetResource : Gtk.Box { } } + public string description { + set { + _title.secondary_text = value; + } + } + public string main_metric_value { set { main_metric_label.label = value; From da4a2b7a366df2cb128bcd3b56c236e37db56520 Mon Sep 17 00:00:00 2001 From: Vishal Rao Date: Wed, 16 Sep 2026 18:51:08 +0530 Subject: [PATCH 4/4] Address review comment --- src/Views/SystemView/SystemGPUView.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/SystemView/SystemGPUView.vala b/src/Views/SystemView/SystemGPUView.vala index dedbc9086..441f852de 100644 --- a/src/Views/SystemView/SystemGPUView.vala +++ b/src/Views/SystemView/SystemGPUView.vala @@ -60,7 +60,7 @@ public class Monitor.SystemGPUView : Monitor.WidgetResource { public SystemGPUView (IGPU _gpu) { gpu = _gpu; - title = (_("Graphics")); + title = _("Graphics"); description = gpu.name; gpu_chart = new Chart (1);