Skip to content

Commit 93de19a

Browse files
committed
scroll: fix navigation panel left/right tilt zoom (for tilt, dy was 0, dy < 0 evaluated to false -> zoom out for both)
1 parent d27f3ef commit 93de19a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/libs/navigation.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,13 @@ static void _lib_navigation_scroll_callback(GtkEventControllerScroll *controller
544544
if(_lib_navigation_widget_to_center(GTK_EVENT_CONTROLLER(controller),
545545
event->scroll.x, event->scroll.y,
546546
&x, &y))
547+
{
548+
const double delta = fabs(dx) > fabs(dy) ? -dx : dy;
549+
const gboolean zoom_in = delta < 0;
550+
547551
dt_dev_zoom_move(&darktable.develop->full, DT_ZOOM_SCROLL,
548-
0.0f, dy < 0, x, y, constrain);
552+
0.0f, zoom_in, x, y, constrain);
553+
}
549554
}
550555
gdk_event_free(event);
551556
}

0 commit comments

Comments
 (0)