[gnome-control-center/wip/kate/status-style-fixing: 2/2] panels: firmware-security: some stlye teaking of the panel




commit c780de3eba9725f57846593558aee6fd77e4115e
Author: Kate Hsuan <hpa redhat com>
Date:   Wed Aug 10 18:13:12 2022 +0800

    panels: firmware-security: some stlye teaking of the panel
    
    Fixed 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             | 4 ++++
 3 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/panels/firmware-security/cc-firmware-security-dialog.c 
b/panels/firmware-security/cc-firmware-security-dialog.c
index 313240570..043fe0f24 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, "description-style");
     }
   else
     {
diff --git a/panels/firmware-security/cc-firmware-security-dialog.ui 
b/panels/firmware-security/cc-firmware-security-dialog.ui
index f584e4f45..f7e0870b4 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">12</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">12</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">12</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 b2b2d2b84..6e189e4a8 100644
--- a/panels/firmware-security/security-level.css
+++ b/panels/firmware-security/security-level.css
@@ -109,3 +109,7 @@ row.error-title label.hsi_label {
   font-weight: bold;
   color: @error_color;
 }
+
+row.description-style label.subtitle{
+  letter-spacing: 1px;
+}


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