views/week-view: Fix inverted Ctrl+scroll zoom direction

Ctrl+scrolling with a mouse wheel zoomed in the opposite direction
than expected: scrolling up zoomed out and scrolling down zoomed in,
which is inconsistent with other GNOME apps such as Loupe and
Nautilus.

Negate the scroll delta in both smooth (touchpad) and discrete
(mouse wheel) scrolling cases, so scrolling up now zooms in.

Fixes #1633

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/815>
This commit is contained in:
Felipe Alves pipe-felipe
2026-08-28 22:01:23 +00:00
committed by Marge Bot
parent 1b10e66078
commit 56128e0574
+2 -2
View File
@@ -304,13 +304,13 @@ on_scroll_controller_scroll_cb (GtkEventControllerScroll *controller,
switch (gdk_scroll_event_get_direction (event))
{
case GDK_SCROLL_SMOOTH:
scale = dy / 100.0 + 1.0;
scale = -dy / 100.0 + 1.0;
discrete = FALSE;
break;
case GDK_SCROLL_UP:
case GDK_SCROLL_DOWN:
scale = dy / 10.0 + 1.0;
scale = -dy / 10.0 + 1.0;
discrete = TRUE;
break;