[gtk+/wip/baedert/gtkimageview: 100/160] demo: Use scrolled window by default



commit b21c478d398b81138377c7644c6e963b194d7f31
Author: Timm Bäder <mail baedert org>
Date:   Mon Jan 25 16:35:23 2016 +0100

    demo: Use scrolled window by default

 demos/gtk-demo/image_view.c  |    1 -
 demos/gtk-demo/image_view.ui |   17 +++++++++++------
 2 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/demos/gtk-demo/image_view.c b/demos/gtk-demo/image_view.c
index e87ece8..3cf3285 100644
--- a/demos/gtk-demo/image_view.c
+++ b/demos/gtk-demo/image_view.c
@@ -117,7 +117,6 @@ scrolled_check_button_active_cb (GObject *source)
       gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroller),
                                       GTK_POLICY_ALWAYS,
                                       GTK_POLICY_ALWAYS);
-      gtk_scrolled_window_set_overlay_scrolling (GTK_SCROLLED_WINDOW (scroller), FALSE);
       g_object_ref (image_view);
       gtk_container_remove (GTK_CONTAINER (parent), image_view);
       gtk_container_add (GTK_CONTAINER (scroller), image_view);
diff --git a/demos/gtk-demo/image_view.ui b/demos/gtk-demo/image_view.ui
index 5f0f21a..6145776 100644
--- a/demos/gtk-demo/image_view.ui
+++ b/demos/gtk-demo/image_view.ui
@@ -142,6 +142,7 @@
           <object class="GtkCheckButton" id="scrolled_check_button">
             <property name="visible">true</property>
             <property name="label">In ScrolledWindow</property>
+            <property name="active">true</property>
             <signal name="toggled" handler="scrolled_check_button_active_cb" />
           </object>
           <packing>
@@ -297,15 +298,19 @@
     </child>
 
     <child>
-      <object class="GtkImageView" id="image_view">
+      <object class="GtkScrolledWindow">
         <property name="visible">true</property>
-        <property name="hexpand">true</property>
-        <property name="vexpand">true</property>
-        <property name="width_request">400</property>
-        <property name="height_request">400</property>
+        <child>
+          <object class="GtkImageView" id="image_view">
+            <property name="visible">true</property>
+            <property name="hexpand">true</property>
+            <property name="vexpand">true</property>
+            <property name="width_request">400</property>
+            <property name="height_request">400</property>
+          </object>
+        </child>
       </object>
     </child>
-
   </object>
 
 


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