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.
This commit is contained in:
Thomas Goyne 2012-05-01 02:49:43 +00:00
parent 1c4bb4a0e2
commit 834c2849da

View file

@ -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;