Skip to content
Extraits de code Groupes Projets
Valider 9174650c rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

Don't invert horizontal scroll on the audio display on OS X

For some reason horizontal scroll comes pre-flipped.
parent 9bed1a2e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -158,9 +158,13 @@ void AudioBox::OnMouseWheel(wxMouseEvent &evt) { ...@@ -158,9 +158,13 @@ void AudioBox::OnMouseWheel(wxMouseEvent &evt) {
if (!zoom) if (!zoom)
{ {
int amount = -evt.GetWheelRotation() * GetClientSize().GetWidth() / (evt.GetWheelDelta() * 3); int amount = -evt.GetWheelRotation() * GetClientSize().GetWidth() / (evt.GetWheelDelta() * 3);
// If the user did a horizontal scroll the amount should be inverted // If the user did a horizontal scroll the amount should be inverted
// for it to be natural. // for it to be natural.
// On OS X it's pre-flipped for some reason.
#ifndef __APPLE__
if (evt.GetWheelAxis() == 1) amount = -amount; if (evt.GetWheelAxis() == 1) amount = -amount;
#endif
// Reset any accumulated zoom // Reset any accumulated zoom
mouse_zoom_accum = 0; mouse_zoom_accum = 0;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter