[gnome-tour/wip/exalm/scroll-params] paginator: Set scroll params




commit c886864bef30bdc3680559670a1f5c1f80a19f45
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Dec 10 02:12:09 2021 +0500

    paginator: Set scroll params
    
    21df0c023cc50ae0418cd378de2245b1b07eab32 has lost the duration, but it was
    longer than the carousel default. Reduce spring stiffness to have a longer
    transition.

 src/widgets/paginator.rs | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/widgets/paginator.rs b/src/widgets/paginator.rs
index fd6f4f2..09ce6ad 100644
--- a/src/widgets/paginator.rs
+++ b/src/widgets/paginator.rs
@@ -113,6 +113,8 @@ impl PaginatorWidget {
         self.carousel_dots.set_carousel(Some(&self.carousel));
         self.carousel.set_hexpand(true);
         self.carousel.set_vexpand(true);
+        self.carousel
+            .set_scroll_params(&libadwaita::SpringParams::new(1.0, 0.5, 300.0));
 
         self.carousel
             .connect_position_notify(clone!(@weak p => move |_| {


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