summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
adb2a97)
The zoom supports 'double' as input type but since delta() and 120 are
integer, this wasn't used and any event with a delta lower than 120 was
ignored.
With this mod, the zoom level changes are _much_ smoother on trackpads
Signed-off-by: Sylvain Munaut <redacted>
(event->delta() * height()) / (8 * 120));
} else {
// Vertical scrolling is interpreted as zooming in/out
(event->delta() * height()) / (8 * 120));
} else {
// Vertical scrolling is interpreted as zooming in/out
- view_.zoom(event->delta() / 120, event->x());
+ view_.zoom(event->delta() / 120.0, event->x());
}
} else if (event->orientation() == Qt::Horizontal) {
// Horizontal scrolling is interpreted as moving left/right
}
} else if (event->orientation() == Qt::Horizontal) {
// Horizontal scrolling is interpreted as moving left/right