From 7b214947742994c92c6abc7f9863b2749d989a6d Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 3 Aug 2021 11:19:56 +0200 Subject: [PATCH 1/4] power: Dim the info box icon This brings less focus to the icon and more to the text. See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1421 --- panels/power/cc-power-profile-info-row.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panels/power/cc-power-profile-info-row.ui b/panels/power/cc-power-profile-info-row.ui index bc49a24ace..6f411c688b 100644 --- a/panels/power/cc-power-profile-info-row.ui +++ b/panels/power/cc-power-profile-info-row.ui @@ -21,7 +21,7 @@ info-symbolic 5 -- GitLab From 19fb4e4a0cc5752b8ea86b663009f12f2bea722b Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 4 Aug 2021 11:26:33 +0200 Subject: [PATCH 2/4] power: Remove icons from power profiles They were originally included was to educate users about what the icons mean, for when they appeared in the top bar. However, since we no longer plan on showing the status icon in the top bar, it's not so important that people learn the meaning of the icons. See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1421 --- panels/power/cc-power-profile-row.c | 13 +------------ panels/power/cc-power-profile-row.ui | 15 +-------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/panels/power/cc-power-profile-row.c b/panels/power/cc-power-profile-row.c index ee66bdfd01..a8458c3665 100644 --- a/panels/power/cc-power-profile-row.c +++ b/panels/power/cc-power-profile-row.c @@ -35,7 +35,6 @@ struct _CcPowerProfileRow GtkListBoxRow parent_instance; GtkRadioButton *button; - GtkImage *icon_image; GtkLabel *subtitle_label; GtkLabel *title_label; @@ -106,7 +105,6 @@ cc_power_profile_row_class_init (CcPowerProfileRowClass *klass) gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/power/cc-power-profile-row.ui"); gtk_widget_class_bind_template_child (widget_class, CcPowerProfileRow, button); - gtk_widget_class_bind_template_child (widget_class, CcPowerProfileRow, icon_image); gtk_widget_class_bind_template_child (widget_class, CcPowerProfileRow, subtitle_label); gtk_widget_class_bind_template_child (widget_class, CcPowerProfileRow, title_label); @@ -175,7 +173,7 @@ CcPowerProfileRow * cc_power_profile_row_new (CcPowerProfile power_profile) { CcPowerProfileRow *self; - const char *text, *subtext, *icon_name, *class_name; + const char *text, *subtext; self = g_object_new (CC_TYPE_POWER_PROFILE_ROW, NULL); @@ -185,20 +183,14 @@ cc_power_profile_row_new (CcPowerProfile power_profile) case CC_POWER_PROFILE_PERFORMANCE: text = _("Performance"); subtext = _("High performance and power usage."); - icon_name = "power-profile-performance-symbolic"; - class_name = "performance"; break; case CC_POWER_PROFILE_BALANCED: text = _("Balanced Power"); subtext = _("Standard performance and power usage."); - icon_name = "power-profile-balanced-symbolic"; - class_name = NULL; break; case CC_POWER_PROFILE_POWER_SAVER: text = _("Power Saver"); subtext = _("Reduced performance and power usage."); - icon_name = "power-profile-power-saver-symbolic"; - class_name = "low-power"; break; default: g_assert_not_reached (); @@ -206,9 +198,6 @@ cc_power_profile_row_new (CcPowerProfile power_profile) gtk_label_set_markup (self->title_label, text); gtk_label_set_markup (self->subtitle_label, subtext); - gtk_image_set_from_icon_name (self->icon_image, icon_name, GTK_ICON_SIZE_MENU); - if (class_name != NULL) - gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self->icon_image)), class_name); return self; } diff --git a/panels/power/cc-power-profile-row.ui b/panels/power/cc-power-profile-row.ui index 64516edf30..1391093bac 100644 --- a/panels/power/cc-power-profile-row.ui +++ b/panels/power/cc-power-profile-row.ui @@ -28,19 +28,6 @@ 2 - - - True - 6 - - - - 1 - 0 - - True @@ -53,7 +40,7 @@ 6 - 2 + 1 0 -- GitLab From 8fb8a340bfbb63006f602a997b05bd125b2584c3 Mon Sep 17 00:00:00 2001 From: Allan Day Date: Wed, 4 Aug 2021 11:28:14 +0200 Subject: [PATCH 3/4] power: Align power profile info boxes with profiles text See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1421 --- panels/power/cc-power-profile-info-row.ui | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panels/power/cc-power-profile-info-row.ui b/panels/power/cc-power-profile-info-row.ui index 6f411c688b..34807c38cd 100644 --- a/panels/power/cc-power-profile-info-row.ui +++ b/panels/power/cc-power-profile-info-row.ui @@ -8,11 +8,11 @@ True horizontal - 8 + 4 8 8 8 - 8 + 4 True -- GitLab From e4c496158ea18ac070d23d93d7ae85983d3acf3f Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 5 Aug 2021 15:24:58 +0200 Subject: [PATCH 4/4] power: Change "Balanced" power profile label https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4530#note_1241985 --- panels/power/cc-power-profile-row.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panels/power/cc-power-profile-row.c b/panels/power/cc-power-profile-row.c index a8458c3665..9d7f1fe6bc 100644 --- a/panels/power/cc-power-profile-row.c +++ b/panels/power/cc-power-profile-row.c @@ -185,7 +185,7 @@ cc_power_profile_row_new (CcPowerProfile power_profile) subtext = _("High performance and power usage."); break; case CC_POWER_PROFILE_BALANCED: - text = _("Balanced Power"); + text = _("Balanced"); subtext = _("Standard performance and power usage."); break; case CC_POWER_PROFILE_POWER_SAVER: -- GitLab