views/month-view: Smoothen discrete scrolling animation

The current animation duration paired with the ease-out-quad function
eases out imperceptibly fast (almost instantaneously), which makes the
overall animation feel laggy.

This patch addresses the aforementioned issue by increasing the
duration to 500ms. This then makes the ease-out-quad function ease
out relatively slowly, which is addressed by changing the function
to ease-out-quart - a function that eases out much quicker.

As a result, the animation should feel much more fluid and natural,
without giving the impression that it's 3 times slower.

Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1125
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/670>
This commit is contained in:
Hari Rana
2025-11-29 08:59:50 -05:00
parent 0a8bd0e994
commit 82198e0b8f
+2 -2
View File
@@ -593,10 +593,10 @@ animate_row_scroll (GcalMonthView *self,
self->row_offset_animation = adw_timed_animation_new (GTK_WIDGET (self),
self->row_offset,
n_rows,
increase_duration ? 150 : 100, // ms
increase_duration ? 500 : 200, // ms
g_steal_pointer (&animation_target));
adw_timed_animation_set_easing (ADW_TIMED_ANIMATION (self->row_offset_animation),
ADW_EASE_OUT_QUAD);
ADW_EASE_OUT_QUART);
adw_animation_set_follow_enable_animations_setting (self->row_offset_animation, FALSE);
g_signal_connect (self->row_offset_animation,