[libadwaita/wip/cdavis/boxed-list-changes: 4/5] stylesheet: Add .boxed-list and swap uses of .content




commit 80445e10299c9e862e70cebbeda4a6cbc0c49711
Author: Christopher Davis <christopherdavis gnome org>
Date:   Mon Nov 1 01:36:09 2021 -0700

    stylesheet: Add .boxed-list and swap uses of .content
    
    The proper HIG name for what we formerly called
    a "Content List" is "Boxed List". We should use that
    HIG name for our style class.
    
    .content is still around for legacy purposes.

 demo/adw-demo-window.ui                       | 2 +-
 demo/adw-style-demo-window.ui                 | 2 +-
 doc/migrating-between-development-versions.md | 8 ++++++++
 doc/migrating-libhandy-1-4-to-libadwaita.md   | 8 ++++++++
 src/adw-preferences-group.ui                  | 2 +-
 src/adw-preferences-window.ui                 | 2 +-
 src/stylesheet/widgets/_lists.scss            | 6 ++++--
 7 files changed, 24 insertions(+), 6 deletions(-)
---
diff --git a/demo/adw-demo-window.ui b/demo/adw-demo-window.ui
index 28e9a8f7..ebd0b867 100644
--- a/demo/adw-demo-window.ui
+++ b/demo/adw-demo-window.ui
@@ -722,7 +722,7 @@
                                               <object class="GtkListBox" id="avatar_contacts">
                                                 <property name="selection-mode">none</property>
                                                 <style>
-                                                  <class name="content"/>
+                                                  <class name="boxed-list"/>
                                                 </style>
                                               </object>
                                             </child>
diff --git a/demo/adw-style-demo-window.ui b/demo/adw-style-demo-window.ui
index 5b373c85..9a3e0d00 100644
--- a/demo/adw-style-demo-window.ui
+++ b/demo/adw-style-demo-window.ui
@@ -711,7 +711,7 @@ The "card" style class can be used to achieve the same style with GtkBox or simi
                         <property name="selection-mode">none</property>
                         <property name="tooltip-text">content</property>
                         <style>
-                          <class name="content"/>
+                          <class name="boxed-list"/>
                         </style>
                         <child>
                           <object class="AdwActionRow">
diff --git a/doc/migrating-between-development-versions.md b/doc/migrating-between-development-versions.md
index df8b8e08..5e5e46fb 100644
--- a/doc/migrating-between-development-versions.md
+++ b/doc/migrating-between-development-versions.md
@@ -248,3 +248,11 @@ the item selection style. The border can be replicated by manually adding a
 The `.combo` popover style class has been removed. Use `.menu` instead. You may
 need to remove manually added margins, padding or minimum height from the list
 items inside while doing it.
+
+#### Adapt to List Style Changes
+
+For boxed lists we now have the `.boxed-list` style class that matches
+the name of the design pattern. If you were using the `.content` style
+class, you should use `.boxed-list` instead.
+
+The `.content` style class currently remains for compatibility purposes.
diff --git a/doc/migrating-libhandy-1-4-to-libadwaita.md b/doc/migrating-libhandy-1-4-to-libadwaita.md
index 3aa71b8a..c280d828 100644
--- a/doc/migrating-libhandy-1-4-to-libadwaita.md
+++ b/doc/migrating-libhandy-1-4-to-libadwaita.md
@@ -394,6 +394,14 @@ style.
 The same rules are also used for the `.toolbar` style class now, instead of
 making every button appear flat.
 
+#### Adapt to List Style Changes
+
+For boxed lists we now have the `.boxed-list` style class that matches
+the name of the design pattern. If you were using the `.content` style
+class, you should use `.boxed-list` instead.
+
+The `.content` style class currently remains for compatibility purposes.
+
 #### Adjusting Icons
 
 If you're bundling icons from the icon library with your application, make sure
diff --git a/src/adw-preferences-group.ui b/src/adw-preferences-group.ui
index 948eefe6..ca72faa5 100644
--- a/src/adw-preferences-group.ui
+++ b/src/adw-preferences-group.ui
@@ -46,7 +46,7 @@
                 <property name="selection_mode">none</property>
                 <signal name="keynav-failed" handler="listbox_keynav_failed_cb" swapped="yes"/>
                 <style>
-                  <class name="content"/>
+                  <class name="boxed-list"/>
                 </style>
               </object>
             </child>
diff --git a/src/adw-preferences-window.ui b/src/adw-preferences-window.ui
index ad8625d6..cc1dc6b8 100644
--- a/src/adw-preferences-window.ui
+++ b/src/adw-preferences-window.ui
@@ -123,7 +123,7 @@
                                             <signal name="map" handler="search_results_map" swapped="yes"/>
                                             <signal name="unmap" handler="search_results_unmap" 
swapped="yes"/>
                                             <style>
-                                              <class name="content"/>
+                                              <class name="boxed-list"/>
                                             </style>
                                           </object>
                                         </child>
diff --git a/src/stylesheet/widgets/_lists.scss b/src/stylesheet/widgets/_lists.scss
index 7acd7612..f40974ef 100644
--- a/src/stylesheet/widgets/_lists.scss
+++ b/src/stylesheet/widgets/_lists.scss
@@ -208,10 +208,12 @@ row.expander {
 }
 
 /*****************
- * Content Lists *
+ * Boxed Lists *
  *****************/
 
-list.content {
+// Deprecated: use .boxed-list instead
+list.content,
+list.boxed-list {
   background-color: $card_bg_color;
   color: $card_fg_color;
   border: 1px solid $card_border_color;


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