diff --git a/CHANGELOG.md b/CHANGELOG.md index c392dbcb..b94607c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ In this document, Mod is Ctrl on Windows/Linux and Cmd on Mac. - Copy cable color when cloning cables with Ctrl+click. - Fix key commands on AZERTY, Dvorak, and all other keyboard layouts. - Add Mouse device to Computer keyboard/mouse MIDI driver. +- Make scrollbar mouse interaction similar to modern OS behavior. - Core - Add Audio-2 module with stereo input/output, a level knob, and VU meters. diff --git a/src/ui/ScrollWidget.cpp b/src/ui/ScrollWidget.cpp index 515e9c74..f101083a 100644 --- a/src/ui/ScrollWidget.cpp +++ b/src/ui/ScrollWidget.cpp @@ -109,7 +109,8 @@ void ScrollWidget::onDragMove(const event::DragMove& e) { if (!(horizontalScrollBar->isVisible() || verticalScrollBar->isVisible())) return; - offset = offset.minus(e.mouseDelta); + math::Vec offsetDelta = e.mouseDelta.div(getAbsoluteZoom()); + offset = offset.minus(offsetDelta); }