sdgui: fix up the smooth scrolling commit
This commit is contained in:
parent
6f5e32386e
commit
aa985514a6
@ -489,8 +489,9 @@ stardict_view_scroll_event (GtkWidget *widget, GdkEventScroll *event)
|
||||
{
|
||||
// On GDK/Wayland, the mouse wheel will typically create 1.5 deltas,
|
||||
// after dividing a 15 degree click angle from libinput by 10.
|
||||
// (Noticed on Arch + Sway, cannot reproduce on Ubuntu 22.04.)
|
||||
// On X11, as libinput(4) indicates, the delta will always be 1.0.
|
||||
double delta = CLAMP(event->delta_y, -1, +1);
|
||||
double delta = CLAMP (event->delta_y, -1, +1);
|
||||
stardict_view_scroll (self, GTK_SCROLL_STEPS, 3 * delta);
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user