[libhandy/wip/exalm/carousel-drag] carousel: Set allow-mouse-drag=false by default



commit a540a7e361c8826a7a7b418a3b5131df4662afd8
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sat May 23 17:40:23 2020 +0500

    carousel: Set allow-mouse-drag=false by default
    
    Fixes https://gitlab.gnome.org/GNOME/libhandy/-/issues/209
    
    Signed-off-by: Alexander Mikhaylenko <alexm gnome org>

 src/hdy-carousel.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/hdy-carousel.c b/src/hdy-carousel.c
index 77804a51..0b841806 100644
--- a/src/hdy-carousel.c
+++ b/src/hdy-carousel.c
@@ -912,15 +912,13 @@ hdy_carousel_class_init (HdyCarouselClass *klass)
    * Sets whether the #HdyCarousel can be dragged with mouse pointer. If the
    * value is %FALSE, dragging is only available on touch.
    *
-   * This should usually be %FALSE.
-   *
    * Since: 1.0
    */
   props[PROP_ALLOW_MOUSE_DRAG] =
     g_param_spec_boolean ("allow-mouse-drag",
                           _("Allow mouse drag"),
                           _("Whether to allow dragging with mouse pointer"),
-                          FALSE,
+                          TRUE,
                           G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
 
   g_object_class_override_property (object_class,
@@ -974,6 +972,7 @@ hdy_carousel_init (HdyCarousel *self)
   self->animation_duration = DEFAULT_DURATION;
 
   self->tracker = hdy_swipe_tracker_new (HDY_SWIPEABLE (self));
+  hdy_swipe_tracker_set_allow_mouse_drag (self->tracker, TRUE);
   self->can_scroll = TRUE;
 
   /*
@@ -1430,8 +1429,6 @@ hdy_carousel_get_allow_mouse_drag (HdyCarousel *self)
  * Sets whether @self can be dragged with mouse pointer. If @allow_mouse_drag
  * is %FALSE, dragging is only available on touch.
  *
- * This should usually be %FALSE.
- *
  * Since: 1.0
  */
 void


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