[libhandy] examples: Add a long swipe switch to the carousel page



commit 1da6e9a706c949ace8456e84cf57e6b01accd572
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sun Jul 12 20:23:46 2020 +0500

    examples: Add a long swipe switch to the carousel page
    
    Signed-off-by: Alexander Mikhaylenko <alexm gnome org>

 examples/hdy-demo-window.ui | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/examples/hdy-demo-window.ui b/examples/hdy-demo-window.ui
index abe657c8..4f10989e 100644
--- a/examples/hdy-demo-window.ui
+++ b/examples/hdy-demo-window.ui
@@ -1008,6 +1008,7 @@ Try using it with a horizontally expanded clamp to make your search entry adapti
                     <child>
                       <object class="HdyCarousel" id="carousel">
                         <property name="visible">True</property>
+                        <property name="allow-long-swipes" bind-source="carousel_long_swipes" 
bind-property="active" bind-flags="sync-create|bidirectional"/>
                         <child>
                           <object class="HdyStatusPage">
                             <property name="visible">True</property>
@@ -1051,6 +1052,19 @@ Try using it with a horizontally expanded clamp to make your search entry adapti
                                     <signal name="notify::selected-index" 
handler="notify_carousel_indicators_cb" swapped="no"/>
                                   </object>
                                 </child>
+                                <child>
+                                  <object class="HdyActionRow">
+                                    <property name="visible">True</property>
+                                    <property name="title" translatable="yes">Long swipes</property>
+                                    <property name="activatable_widget">carousel_long_swipes</property>
+                                    <child>
+                                      <object class="GtkSwitch" id="carousel_long_swipes">
+                                        <property name="visible">True</property>
+                                        <property name="valign">center</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
                               </object>
                             </child>
                           </object>


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