Let inspector window zoom on scroll wheel events (#5867)
A scroll wheel should emit GDK_SCROLL_UP/DOWN/LEFT_RIGHT. The ALT key is left as backup in case a scroll wheel emits GDK_SCROLL_SMOOTH that results in panning (used with trackpads).
This commit is contained in:
@@ -225,15 +225,19 @@ bool Inspector::on_scroll_event(GdkEventScroll *event)
|
||||
break;
|
||||
case GDK_SCROLL_DOWN:
|
||||
delta_y = step_y * deviceScale * imH / 100;
|
||||
alt = true; // zoom for non smooth scroll events (scroll wheel)
|
||||
break;
|
||||
case GDK_SCROLL_UP:
|
||||
delta_y = -step_y * deviceScale * imH / 100;
|
||||
alt = true; // zoom for non smooth scroll events (scroll wheel)
|
||||
break;
|
||||
case GDK_SCROLL_LEFT:
|
||||
delta_x = step_x * deviceScale * imW / 100;
|
||||
alt = true; // zoom for non smooth scroll events (scroll wheel)
|
||||
break;
|
||||
case GDK_SCROLL_RIGHT:
|
||||
delta_x = -step_x * deviceScale * imW / 100;
|
||||
alt = true; // zoom for non smooth scroll events (scroll wheel)
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user