From ea224c4045993fac4f1da0a93c430796324d1f57 Mon Sep 17 00:00:00 2001 From: Felipe Borges Date: Fri, 1 Dec 2023 14:32:18 +0100 Subject: [PATCH 1/2] system: Replace dynamic System row subtitles with static text Row subtitles in Settings are typically a description of the main label or setting. You can see this in Mouse & Touchpad, Privacy, Sharing, and Wi-Fi. For the System panel we did something a bit different and used the subtitle to show the status of each panel. Given the standard use of subtitles elsewhere, this feels a bit surprising which, as a result, makes the panel harder to read. I think that a standard description would probably also be more useful than the current labels. Mockups https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/system/system-panel.png?ref_type=heads This also removes the thin CcSystemPage abstract class because it was only introduced to add the support for dynamic System row subtitle. Now this abstraction is no longer necessary. Fixes #2776 --- panels/system/about/cc-about-page.c | 5 +- panels/system/about/cc-about-page.h | 5 +- panels/system/about/cc-about-page.ui | 2 +- panels/system/cc-system-page.c | 118 ------------------ panels/system/cc-system-page.h | 46 ------- panels/system/cc-system-panel.ui | 8 +- panels/system/datetime/cc-datetime-page.c | 18 +-- panels/system/datetime/cc-datetime-page.h | 4 +- panels/system/datetime/cc-datetime-page.ui | 3 +- panels/system/meson.build | 1 - panels/system/region/cc-region-page.c | 6 +- panels/system/region/cc-region-page.h | 5 +- panels/system/region/cc-region-page.ui | 2 +- .../remote-desktop/cc-remote-desktop-page.c | 16 +-- .../remote-desktop/cc-remote-desktop-page.h | 4 +- .../remote-desktop/cc-remote-desktop-page.ui | 3 +- 16 files changed, 24 insertions(+), 222 deletions(-) delete mode 100644 panels/system/cc-system-page.c delete mode 100644 panels/system/cc-system-page.h diff --git a/panels/system/about/cc-about-page.c b/panels/system/about/cc-about-page.c index 34a7cac8e2..80969f0bfa 100644 --- a/panels/system/about/cc-about-page.c +++ b/panels/system/about/cc-about-page.c @@ -30,7 +30,7 @@ struct _CcAboutPage { - CcSystemPage parent_instance; + AdwNavigationPage parent_instance; CcListRow *disk_row; CcListRow *hardware_model_row; @@ -43,7 +43,7 @@ struct _CcAboutPage GtkWindow *system_details_window; }; -G_DEFINE_TYPE (CcAboutPage, cc_about_page, CC_TYPE_SYSTEM_PAGE) +G_DEFINE_TYPE (CcAboutPage, cc_about_page, ADW_TYPE_NAVIGATION_PAGE) static void about_page_setup_overview (CcAboutPage *self) @@ -76,7 +76,6 @@ about_page_setup_overview (CcAboutPage *self) os_name_text = get_os_name (); cc_list_row_set_secondary_label (self->os_name_row, os_name_text); - cc_system_page_set_summary (CC_SYSTEM_PAGE (self), os_name_text); self->system_details_window = GTK_WINDOW (cc_system_details_window_new ()); parent = (GtkWindow *) gtk_widget_get_native (GTK_WIDGET (self)); diff --git a/panels/system/about/cc-about-page.h b/panels/system/about/cc-about-page.h index 496f9bafeb..254d6b47bb 100644 --- a/panels/system/about/cc-about-page.h +++ b/panels/system/about/cc-about-page.h @@ -19,12 +19,11 @@ #pragma once -#include -#include "cc-system-page.h" +#include G_BEGIN_DECLS #define CC_TYPE_ABOUT_PAGE (cc_about_page_get_type ()) -G_DECLARE_FINAL_TYPE (CcAboutPage, cc_about_page, CC, ABOUT_PAGE, CcSystemPage) +G_DECLARE_FINAL_TYPE (CcAboutPage, cc_about_page, CC, ABOUT_PAGE, AdwNavigationPage) G_END_DECLS diff --git a/panels/system/about/cc-about-page.ui b/panels/system/about/cc-about-page.ui index 5d9e04f81b..93189ce6e4 100644 --- a/panels/system/about/cc-about-page.ui +++ b/panels/system/about/cc-about-page.ui @@ -1,6 +1,6 @@ -