[gnome-todo/wip/cdavis/sidebar-style-consistency: 4/6] sidebar: Use .navigation-sidebar for listboxes




commit c26fd17de22a90a94037c7455aa598fd5e12c010
Author: Christopher Davis <christopherdavis gnome org>
Date:   Thu Oct 28 23:58:49 2021 -0700

    sidebar: Use .navigation-sidebar for listboxes
    
    .navigation-sidebar provides the new standard styling
    for lists. As part of switching to this new style,
    the different row widgets have adjusted spacing
    and colors, and have been made to use standard
    libadwaita text styles.

 .../task-lists-workspace/gtd-sidebar-list-row.ui   | 12 +++++------
 .../task-lists-workspace/gtd-sidebar-panel-row.ui  | 20 +++++++------------
 .../gtd-sidebar-provider-row.ui                    | 11 ++---------
 src/plugins/task-lists-workspace/gtd-sidebar.ui    | 23 +++++++++++-----------
 4 files changed, 26 insertions(+), 40 deletions(-)
---
diff --git a/src/plugins/task-lists-workspace/gtd-sidebar-list-row.ui 
b/src/plugins/task-lists-workspace/gtd-sidebar-list-row.ui
index 7f1d215e..380d1ed4 100644
--- a/src/plugins/task-lists-workspace/gtd-sidebar-list-row.ui
+++ b/src/plugins/task-lists-workspace/gtd-sidebar-list-row.ui
@@ -5,10 +5,10 @@
     <property name="can_focus">1</property>
     <child>
       <object class="GtkBox">
-        <property name="margin-top">10</property>
-        <property name="margin-bottom">10</property>
-        <property name="margin-start">10</property>
-        <property name="margin-end">10</property>
+        <property name="margin-top">12</property>
+        <property name="margin-bottom">12</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
         <property name="spacing">6</property>
         <child>
           <object class="GtkImage" id="color_icon">
@@ -29,10 +29,8 @@
         </child>
         <child>
           <object class="GtkLabel" id="tasks_counter_label">
-            <attributes>
-              <attribute name="scale" value="0.88"></attribute>
-            </attributes>
             <style>
+              <class name="caption"/>
               <class name="dim-label"/>
             </style>
           </object>
diff --git a/src/plugins/task-lists-workspace/gtd-sidebar-panel-row.ui 
b/src/plugins/task-lists-workspace/gtd-sidebar-panel-row.ui
index 39c0d15b..5722bd83 100644
--- a/src/plugins/task-lists-workspace/gtd-sidebar-panel-row.ui
+++ b/src/plugins/task-lists-workspace/gtd-sidebar-panel-row.ui
@@ -5,17 +5,13 @@
     <property name="can_focus">1</property>
     <child>
       <object class="GtkBox">
-        <property name="margin-top">10</property>
-        <property name="margin-bottom">10</property>
-        <property name="margin-start">10</property>
-        <property name="margin-end">10</property>
-        <property name="spacing">6</property>
+        <property name="margin-top">12</property>
+        <property name="margin-bottom">12</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
+        <property name="spacing">12</property>
         <child>
-          <object class="GtkImage" id="panel_icon">
-            <style>
-              <class name="dim-label"/>
-            </style>
-          </object>
+          <object class="GtkImage" id="panel_icon"/>
         </child>
         <child>
           <object class="GtkLabel" id="title_label">
@@ -26,10 +22,8 @@
         <child>
           <object class="GtkLabel" id="subtitle_label">
             <property name="xalign">1.0</property>
-            <attributes>
-              <attribute name="scale" value="0.88"></attribute>
-            </attributes>
             <style>
+              <class name="caption"/>
               <class name="dim-label"/>
             </style>
           </object>
diff --git a/src/plugins/task-lists-workspace/gtd-sidebar-provider-row.ui 
b/src/plugins/task-lists-workspace/gtd-sidebar-provider-row.ui
index 6f2e0129..e97e3189 100644
--- a/src/plugins/task-lists-workspace/gtd-sidebar-provider-row.ui
+++ b/src/plugins/task-lists-workspace/gtd-sidebar-provider-row.ui
@@ -8,8 +8,6 @@
     <property name="margin_top">6</property>
     <child>
       <object class="GtkBox">
-        <property name="margin_start">6</property>
-        <property name="margin_end">6</property>
         <property name="margin_top">6</property>
         <property name="spacing">3</property>
         <property name="orientation">vertical</property>
@@ -22,11 +20,8 @@
               <object class="GtkLabel" id="provider_label">
                 <property name="hexpand">1</property>
                 <property name="xalign">0.0</property>
-                <attributes>
-                  <attribute name="weight" value="bold"></attribute>
-                  <attribute name="scale" value="0.88"></attribute>
-                </attributes>
                 <style>
+                  <class name="caption-heading"/>
                   <class name="dim-label"/>
                 </style>
               </object>
@@ -67,10 +62,8 @@
             <property name="margin-bottom">12</property>
             <property name="xalign">0.0</property>
             <property name="label" translatable="yes">Loading…</property>
-            <attributes>
-              <attribute name="scale" value="0.88"></attribute>
-            </attributes>
             <style>
+              <class name="caption"/>
               <class name="dim-label"/>
             </style>
           </object>
diff --git a/src/plugins/task-lists-workspace/gtd-sidebar.ui b/src/plugins/task-lists-workspace/gtd-sidebar.ui
index 45b33d14..26270792 100644
--- a/src/plugins/task-lists-workspace/gtd-sidebar.ui
+++ b/src/plugins/task-lists-workspace/gtd-sidebar.ui
@@ -63,6 +63,9 @@
                     <property name="vexpand">true</property>
                     <property name="selection_mode">browse</property>
                     <signal name="row-activated" handler="on_listbox_row_activated_cb" object="GtdSidebar" 
swapped="no"/>
+                    <style>
+                      <class name="navigation-sidebar"/>
+                    </style>
 
                     <!-- Archive row -->
                     <child>
@@ -70,18 +73,14 @@
                         <property name="can_focus">1</property>
                         <child>
                           <object class="GtkBox">
-                            <property name="margin-top">10</property>
-                            <property name="margin-bottom">10</property>
-                            <property name="margin-start">10</property>
-                            <property name="margin-end">10</property>
-                            <property name="spacing">6</property>
+                            <property name="margin-top">12</property>
+                            <property name="margin-bottom">12</property>
+                            <property name="margin-start">6</property>
+                            <property name="margin-end">6</property>
+                            <property name="spacing">12</property>
                             <child>
                               <object class="GtkImage">
                                 <property name="icon-name">folder-symbolic</property>
-                                <property name="pixel-size">16</property>
-                                <style>
-                                  <class name="dim-label"/>
-                                </style>
                               </object>
                             </child>
                             <child>
@@ -94,9 +93,8 @@
                             <child>
                               <object class="GtkImage">
                                 <property name="icon-name">go-next-symbolic</property>
-                                <property name="pixel-size">16</property>
                                 <style>
-                                  <class name="sidebar-icon"/>
+                                  <class name="dim-label"/>
                                 </style>
                               </object>
                             </child>
@@ -120,6 +118,9 @@
                     <property name="vexpand">true</property>
                     <property name="selection_mode">browse</property>
                     <signal name="row-activated" handler="on_listbox_row_activated_cb" object="GtdSidebar" 
swapped="no"/>
+                    <style>
+                      <class name="navigation-sidebar"/>
+                    </style>
 
                     <child type="placeholder">
                       <object class="GtkBox">


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