From 834c2849da86b474d1b4c35343e93d6e362ef3fd Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Tue, 1 May 2012 02:49:43 +0000 Subject: [PATCH] Scroll 1/3 of the audio display per mouse wheel click rather than 120 pixels This is what 2.1.x did (except this actually handles nonstandard wheel deltas) and is generally far more usable. Originally committed to SVN as r6732. --- aegisub/src/audio_box.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aegisub/src/audio_box.cpp b/aegisub/src/audio_box.cpp index f488baa4d..99057ef68 100644 --- a/aegisub/src/audio_box.cpp +++ b/aegisub/src/audio_box.cpp @@ -157,7 +157,7 @@ void AudioBox::OnMouseWheel(wxMouseEvent &evt) { bool zoom = evt.CmdDown() != OPT_GET("Audio/Wheel Default to Zoom")->GetBool(); if (!zoom) { - int amount = -evt.GetWheelRotation(); + int amount = -evt.GetWheelRotation() * GetClientSize().GetWidth() / (evt.GetWheelDelta() * 3); // If the user did a horizontal scroll the amount should be inverted // for it to be natural. if (evt.GetWheelAxis() == 1) amount = -amount;