New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change shortcut for zoom from Wheel to CTRL+Wheel #1517

Closed
Champal opened this Issue Apr 6, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@Champal
Copy link

Champal commented Apr 6, 2018

Hi,

GanttProject is an useful soft but as discuss here it's very annoying to change zoom level by mouse wheel.

It's the first time I look at the GanttProject source code but with this doc I successfully modify the Zoom shortcut.

In the file MouseWheelListenerBase.java I modified the function mouseWheelMoved to check if CTRL key is pressed. This works fine !

  public void mouseWheelMoved(MouseWheelEvent e) {
    if (e.isControlDown()) {
      if (isRotationUp(e)) {
        fireZoomIn();
      } else {
        fireZoomOut();
      }
    } 
  }

What's the next step ? Add an option somewhere ?

After that I would like to assign Wheel to scroll down/up and SHIFT+Wheel to sroll left/right but it's seems to be a little more complex.
Should I add the ScrollViewInteraction in MouseWheelListenerBase.java or Should I add MouseWheelEvent in ScrollViewInteraction ?

Champal

dbarashev added a commit that referenced this issue Apr 17, 2018

Changed mouse wheel behavior.
Update issue #270, issue #1517

dbarashev added a commit that referenced this issue Apr 17, 2018

@dbarashev dbarashev added this to the 2.8.7 milestone Apr 18, 2018

@dbarashev dbarashev closed this Apr 18, 2018

@Champal

This comment has been minimized.

Copy link

Champal commented Apr 23, 2018

Wow ! impressive job, all that I wanted ! thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment