[libadwaita/wip/exalm/demo] demo: Use AdwPreferencesGroup where possible



commit 663068c6c93a82308542bae607fd1ed42469298e
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Oct 13 16:07:50 2021 +0500

    demo: Use AdwPreferencesGroup where possible
    
    Simplify it a little.

 demo/adw-demo-window.c  |  4 ----
 demo/adw-demo-window.ui | 32 ++++++--------------------------
 2 files changed, 6 insertions(+), 30 deletions(-)
---
diff --git a/demo/adw-demo-window.c b/demo/adw-demo-window.c
index 6796733d..9e199db8 100644
--- a/demo/adw-demo-window.c
+++ b/demo/adw-demo-window.c
@@ -16,10 +16,8 @@ struct _AdwDemoWindow
   GtkStack *stack;
   AdwComboRow *leaflet_transition_row;
   AdwLeaflet *subpage_leaflet;
-  GtkListBox *lists_listbox;
   AdwCarousel *carousel;
   GtkBox *carousel_box;
-  GtkListBox *carousel_listbox;
   GtkStack *carousel_indicators_stack;
   AdwAvatar *avatar;
   GtkEntry *avatar_text;
@@ -406,10 +404,8 @@ adw_demo_window_class_init (AdwDemoWindowClass *klass)
   gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, stack);
   gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, leaflet_transition_row);
   gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, subpage_leaflet);
-  gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, lists_listbox);
   gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, carousel);
   gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, carousel_box);
-  gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, carousel_listbox);
   gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, carousel_indicators_stack);
   gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, avatar);
   gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, avatar_text);
diff --git a/demo/adw-demo-window.ui b/demo/adw-demo-window.ui
index 95c29126..ea00eaab 100644
--- a/demo/adw-demo-window.ui
+++ b/demo/adw-demo-window.ui
@@ -147,11 +147,7 @@
                             <property name="child">
                               <object class="AdwClamp">
                                 <property name="child">
-                                  <object class="GtkListBox">
-                                    <property name="selection-mode">none</property>
-                                    <style>
-                                      <class name="content"/>
-                                    </style>
+                                  <object class="AdwPreferencesGroup">
                                     <child>
                                       <object class="AdwComboRow" id="leaflet_transition_row">
                                         <property name="subtitle" translatable="yes">The type of transition 
to use when the leaflet adapts its size or when changing the visible child</property>
@@ -202,11 +198,7 @@
                                 <property name="maximum-size" bind-source="clamp_maximum_size_adjustment" 
bind-property="value" bind-flags="sync-create"/>
                                 <property name="tightening-threshold" 
bind-source="clamp_tightening_threshold_adjustment" bind-property="value" bind-flags="sync-create"/>
                                 <property name="child">
-                                  <object class="GtkListBox" id="clamp_listbox">
-                                    <property name="selection-mode">none</property>
-                                    <style>
-                                      <class name="content"/>
-                                    </style>
+                                  <object class="AdwPreferencesGroup">
                                     <child>
                                       <object class="AdwActionRow">
                                         <property name="title" translatable="yes">Maximum width</property>
@@ -251,11 +243,7 @@
                                 <property name="maximum-size">400</property>
                                 <property name="tightening-threshold">300</property>
                                 <property name="child">
-                                  <object class="GtkListBox" id="lists_listbox">
-                                    <property name="selection-mode">none</property>
-                                    <style>
-                                      <class name="content"/>
-                                    </style>
+                                  <object class="AdwPreferencesGroup">
                                     <child>
                                       <object class="AdwActionRow">
                                         <property name="icon-name">row-preferences-symbolic</property>
@@ -525,13 +513,9 @@
                                     <property name="margin-end">12</property>
                                     <property name="maximum-size">400</property>
                                     <property name="tightening-threshold">300</property>
+                                    <property name="valign">center</property>
                                     <child>
-                                      <object class="GtkListBox" id="carousel_listbox">
-                                        <property name="valign">center</property>
-                                        <property name="selection-mode">none</property>
-                                        <style>
-                                          <class name="content"/>
-                                        </style>
+                                      <object class="AdwPreferencesGroup">
                                         <child>
                                           <object class="AdwComboRow" id="carousel_orientation_row">
                                             <property name="title" translatable="yes">Orientation</property>
@@ -712,11 +696,7 @@
                                             <property name="orientation">vertical</property>
                                             <property name="spacing">12</property>
                                             <child>
-                                              <object class="GtkListBox">
-                                                <property name="selection-mode">none</property>
-                                                <style>
-                                                  <class name="content"/>
-                                                </style>
+                                              <object class="AdwPreferencesGroup">
                                                 <child>
                                                   <object class="AdwActionRow">
                                                     <property name="title" translatable="yes">Text</property>


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