-
Notifications
You must be signed in to change notification settings - Fork 978
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add ability to zoom via scroll wheel #263
Conversation
这是来自QQ邮箱的假期自动回复邮件。
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
|
Codecov Report
@@ Coverage Diff @@
## develop #263 +/- ##
=============================================
+ Coverage 70.44% 70.53% +0.08%
- Complexity 1536 1553 +17
=============================================
Files 146 146
Lines 8680 8780 +100
Branches 1405 1423 +18
=============================================
+ Hits 6115 6193 +78
- Misses 1973 1994 +21
- Partials 592 593 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
src/main/java/com/tagtraum/perf/gcviewer/view/ModelChartImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/tagtraum/perf/gcviewer/view/ModelChartImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/tagtraum/perf/gcviewer/view/ModelChartImpl.java
Outdated
Show resolved
Hide resolved
Hi @mfoulks3200 Thank you very much for your contribution! I'll add synchronization of the zoom factor dropdown (percentage number) with the changes triggered by the mousewheel event. Then I'll merge the pull request. One question: You chose "shift" as the modifier combined with mouse wheel to do the zooming. I am used to "control" for zooming (e.g. in all browsers). Is there a particular reason for you chosing "shift"? Would it be ok for you to change to "control" instead of "shift"? @vlsi Thank you very much for your review! Best regards |
Hi Jorg, No worries on the key shortcut, change it to whatever you feel fits best. Shift was just more ergonomic on my mac keyboard. |
I think for mac, cmd (meta) + scroll would do better than shift |
I've added those changes |
@@ -186,7 +186,7 @@ private void maybePopup(MouseEvent e) { | |||
addMouseWheelListener(new MouseWheelListener() { | |||
@Override | |||
public void mouseWheelMoved(MouseWheelEvent e) { | |||
if ((e.getModifiersEx() & InputEvent.SHIFT_DOWN_MASK) != 0) { | |||
if ((e.getModifiersEx() & InputEvent.META_DOWN_MASK) != 0||(e.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) != 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather make the modifier OS-dependent.
In other words, META
for macOS, and CTRL
for the rest.
Just in case, ctrl+click means "right click" in macOS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have pushed a commit to adding the os dependent code using OSXSupport.isOSX().
By the way: @mfoulks3200 thanks again for your contribution and @vlsi for your review comments! |
Added a convenience feature to adjust the view zoom by holding shift and scrolling.