Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Fix scrolling on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
kant2002 committed Mar 24, 2019
1 parent cb77835 commit a940db3
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1419,8 +1419,12 @@ public void focusLost(FocusEvent e) {
public class BigFieldPanelMouseWheelListener implements MouseWheelListener {
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
int wheelRotation = e.getWheelRotation();
int scrollAmount = (wheelRotation < 0) ? -40 : 40;
double wheelRotation = e.getPreciseWheelRotation();
int scrollAmount = (int)(wheelRotation * 40);
if (scrollAmount == 0) {
return;
}

if (hoverHandler.isHoverShowing()) {
hoverHandler.scroll(scrollAmount);
}
Expand Down

0 comments on commit a940db3

Please sign in to comment.