[gnome-calendar/wip/cdavis/use-leaflet: 1/2] window: Use AdwLeaflet for foldable window




commit f20d5f369636382bebbe258640ca20447b0719ce
Author: Christopher Davis <christopherdavis gnome org>
Date:   Thu Jul 7 10:54:40 2022 -0400

    window: Use AdwLeaflet for foldable window
    
    Allows the window to shrink to a smaller width via AdwLeaflet.

 src/gui/gcal-window.ui | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/gcal-window.ui b/src/gui/gcal-window.ui
index 8202ce9d..18b9100c 100644
--- a/src/gui/gcal-window.ui
+++ b/src/gui/gcal-window.ui
@@ -98,14 +98,15 @@
     <child>
       <object class="AdwToastOverlay" id="overlay">
         <child>
-          <object class="GtkBox" id="box">
+          <object class="AdwLeaflet" id="leaflet">
+            <property name="homogeneous">False</property>
             <child>
               <object class="GtkBox">
                 <property name="hexpand">False</property>
                 <property name="orientation">vertical</property>
                 <child>
                   <object class="AdwHeaderBar">
-                    <property name="show-end-title-buttons">False</property>
+                    <property name="show-end-title-buttons" bind-source="leaflet" bind-property="folded" 
bind-flags="sync-create"/>
                     <property name="title-widget">
                       <object class="GcalCalendarButton" id="calendars_button" />
                     </property>
@@ -145,7 +146,12 @@
               </object>
             </child>
             <child>
-              <object class="GtkSeparator"/>
+              <object class="AdwLeafletPage">
+                <property name="navigatable">True</property>
+                <property name="child">
+                  <object class="GtkSeparator"/>
+                </property>
+              </object>
             </child>
             <child>
               <object class="GtkBox">


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