[gnome-control-center/wip/kate/status-style-fixing] firmware-security: Tweak panel style




commit 82b6e2c7bbc4d70888cb4bd4b629ce1620989225
Author: Kate Hsuan <hpa redhat com>
Date:   Wed Aug 10 13:23:36 2022 +0800

    firmware-security: Tweak panel style
    
    Fix the spacing issues of several widgets, including the status icon,
    label, and subtitle in a expander row.
    
    Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1999
    Signed-off-by: Kate Hsuan <hpa redhat com>

 panels/firmware-security/cc-firmware-security-dialog.c  | 6 ++++++
 panels/firmware-security/cc-firmware-security-dialog.ui | 5 ++++-
 panels/firmware-security/security-level.css             | 8 +++++++-
 3 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/panels/firmware-security/cc-firmware-security-dialog.c 
b/panels/firmware-security/cc-firmware-security-dialog.c
index 313240570..737bf7731 100644
--- a/panels/firmware-security/cc-firmware-security-dialog.c
+++ b/panels/firmware-security/cc-firmware-security-dialog.c
@@ -227,6 +227,7 @@ hsi_create_pg_row (const gchar *icon_name,
   GtkWidget *row;
   GtkWidget *status_icon;
   GtkWidget *status_label;
+  GtkWidget *actions_parent;
   const gchar *result_str = NULL;
 
   row = adw_expander_row_new ();
@@ -246,6 +247,10 @@ hsi_create_pg_row (const gchar *icon_name,
 
       gtk_widget_add_css_class (status_icon, "icon");
       gtk_widget_add_css_class (status_label, "hsi_label");
+
+      actions_parent = gtk_widget_get_parent (status_icon);
+      gtk_box_set_spacing (GTK_BOX (actions_parent), 6);
+      gtk_widget_set_margin_end (actions_parent, 12);
     }
 
   if (attr->description != NULL)
@@ -255,6 +260,7 @@ hsi_create_pg_row (const gchar *icon_name,
       gtk_widget_add_css_class (subrow, "view");
       adw_action_row_set_subtitle (ADW_ACTION_ROW (subrow), str);
       adw_expander_row_add_row (ADW_EXPANDER_ROW (row), subrow);
+      gtk_widget_add_css_class (subrow, "security-description-row");
     }
   else
     {
diff --git a/panels/firmware-security/cc-firmware-security-dialog.ui 
b/panels/firmware-security/cc-firmware-security-dialog.ui
index f584e4f45..c1a3a6758 100644
--- a/panels/firmware-security/cc-firmware-security-dialog.ui
+++ b/panels/firmware-security/cc-firmware-security-dialog.ui
@@ -27,7 +27,7 @@
 
                 <child>
                   <object class="AdwPreferencesPage">
-                    <property name="vexpand">True</property>
+                    <property name="vexpand-set">True</property>
 
                     <child>
                       <object class="AdwPreferencesGroup">
@@ -103,6 +103,7 @@
                                 <property name="vexpand">True</property>
                                 <property name="justify">left</property>
                                 <property name="label">Failed</property>
+                                <property name="margin-end">6</property>
                                 <style>
                                   <class name="hsi_label" />
                                   <class name="error-title" />
@@ -138,6 +139,7 @@
                                 <property name="vexpand">True</property>
                                 <property name="justify">left</property>
                                 <property name="label">Failed</property>
+                                <property name="margin-end">6</property>
                                 <style>
                                   <class name="hsi_label" />
                                   <class name="error-title" />
@@ -173,6 +175,7 @@
                                 <property name="vexpand">True</property>
                                 <property name="justify">left</property>
                                 <property name="label">Failed</property>
+                                <property name="margin-end">6</property>
                                 <style>
                                   <class name="hsi_label" />
                                   <class name="error-title" />
diff --git a/panels/firmware-security/security-level.css b/panels/firmware-security/security-level.css
index 282412d98..1535b4544 100644
--- a/panels/firmware-security/security-level.css
+++ b/panels/firmware-security/security-level.css
@@ -101,9 +101,15 @@ row.error-hsi-icon image.hsi_icon {
 }
 
 row.success-title label.hsi_label {
+  font-weight: bold;
   color: @success_color;
 }
 
 row.error-title label.hsi_label {
+  font-weight: bold;
   color: @error_color;
-}
\ No newline at end of file
+}
+
+row.security-description-row label.subtitle {
+  padding: 12px 0;
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]