This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 212484 - Unwanted font size changes
Summary: Unwanted font size changes
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Actions/Menu/Toolbar (show other bugs)
Version: 7.1.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 208594 212596 221489 (view as bug list)
Depends on: 41807 203243
Blocks: 214775 214772
  Show dependency tree
 
Reported: 2012-05-14 14:26 UTC by sungmoonc
Modified: 2012-11-06 16:49 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sungmoonc 2012-05-14 14:26:00 UTC
When you do "Command Button + Scrolling up/down", you can increase or decrease the font size. This is a feature of NetBeans. The problem is, when you scroll first, and while it is scrolling, when you press the command key, then the font size gets bigger or smaller. This is not an intended behavior. Because of this behavior, when you scroll up and down, switch to another application by pressing "Command+Tab" and comeback, you see that your editor font got bigger or smaller. I tried the same with Eclipse or IntelliJ, but they don't support such font-size-change hot keys, so don't have the same problem. See the video from the URL provided.

http://www.screencast.com/users/Sungmoon/folders/Jing/media/ab328f77-db53-4541-8713-1676d67615df

Product Version = NetBeans IDE 7.1.1 (Build 201203012225)
Operating System = Mac OS X version 10.7.3 running on x86_64
Java; VM; Vendor = 1.6.0_31
Runtime = Java HotSpot(TM) 64-Bit Server VM 20.6-b01-415
Comment 1 Petr Somol 2012-05-14 15:29:12 UTC
Mila, can we detect this and prevent it from happening ? Thanks, Petr
Comment 2 Milutin Kristofic 2012-05-15 11:32:54 UTC
As workaround you can change shortcuts for zoom in and zoom out in tool-options-keymap. You can change it for alt+wheel up or make it empty so this feature will be disabled.
Comment 3 Vladimir Voskresensky 2012-05-17 07:18:53 UTC
Mila, Petr, Martin,
There are so many complains about Ctrl+wheel, so may be it's really should be Alt+wheel by default?
I understand this confusions, Ctrl+click is very popular action and if you use mouse a lot (and not laptop's sensors) => it's very usual situation when scroll using mouse and as soon as identifier is visible in document's area user presses Ctrl for the following Ctlr+click and Bummm, font is changed.

As I understand originally Ctrl+wheel was assigned to be as in browsers, but browsers do not use Ctrl to follow hyperlinks, while IDE makes hyperlinks only after pressing Ctrl => all this usability problems.

I think, it's worth to pay more careful attention till 7.2 is not yet released.
This is the first release with this functionality and it would be not good to tell peoples on forum:
"You can change it for alt+wheel up or make it empty so
this feature will be disabled."
Default key map should not harm users.
Comment 4 Jiri Prox 2012-05-17 09:03:54 UTC
*** Bug 212596 has been marked as a duplicate of this bug. ***
Comment 5 Petr Somol 2012-05-18 09:28:10 UTC
(In reply to comment #3)
> Mila, Petr, Martin,
> There are so many complains about Ctrl+wheel, so may be it's really should be
> Alt+wheel by default?
> I understand this confusions, Ctrl+click is very popular action and if you use
> mouse a lot (and not laptop's sensors) => it's very usual situation when scroll
> using mouse and as soon as identifier is visible in document's area user
> presses Ctrl for the following Ctlr+click and Bummm, font is changed.
> 
> As I understand originally Ctrl+wheel was assigned to be as in browsers, but
> browsers do not use Ctrl to follow hyperlinks, while IDE makes hyperlinks only
> after pressing Ctrl => all this usability problems.
> 
> I think, it's worth to pay more careful attention till 7.2 is not yet released.
> This is the first release with this functionality and it would be not good to
> tell peoples on forum:
> "You can change it for alt+wheel up or make it empty so
> this feature will be disabled."
> Default key map should not harm users.

I agree with Vladimir's comment. Mila, I am not sure whether Alt-wheel is used for something else, but I too have received complaints against Ctrl-wheel so it would be better changed somehow. Maybe even Ctrl-Alt-wheel or Ctrl-Shift-wheel would do..
Comment 6 Miloslav Metelka 2012-05-21 11:44:56 UTC
Ok, so I would remap the zooming to Alt+wheel and test whether we'll be satisfied with that.
Comment 7 Miloslav Metelka 2012-05-21 15:09:29 UTC
Zoom Text In/Out remapped to Alt+MouseWheel.
http://hg.netbeans.org/jet-main/rev/977e40c76f8f
Comment 8 Vladimir Voskresensky 2012-05-22 13:17:30 UTC
Mila, I get the following warning during build.

WARNING: The keybinding 'A-MOUSE_WHEEL_DOWN' in Editors/Keybindings/NetBeans/Defaults/org-netbeans-modules-editor-keybindings.xml may not work correctly on Mac. Keybindings starting with Alt or Ctrl should be coded with latin capital letters 'O' or 'D' respectively. For details see org.openide.util.Utilities.stringToKey().
Comment 9 Quality Engineering 2012-05-22 16:32:54 UTC
Integrated into 'main-golden', will be available in build *201205220903* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/977e40c76f8f
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #212484 - Unwanted font size changes - Zoom Text In/Out remapped to Alt+MouseWheel.
Comment 10 Miloslav Metelka 2012-05-25 08:59:15 UTC
I wanted to have the Alt+MouseWheel on all platforms IMHO if I would use 'D' I think I would have Meta+Wheel on Mac. Which is of course also possible in case there's no other (possibly system) binding on Meta+Wheel on Mac (I no longer work on Mac so could someone comment on this?) This would likely be an easiest way to get rid of the warning :-) Thanks.
Comment 11 Miloslav Metelka 2012-05-25 09:00:00 UTC
Sorry it should be 'O' instead of 'D', D is like Ctrl.
Comment 12 Miloslav Metelka 2012-05-29 09:00:36 UTC
As confirmed by Tomas Zezula we should leave the current state with 'A' modifier since by using 'O' we would clash with system-level zoom on Mac OSX.
If the build issues a warning then please file an issue against build infrastructure since IMO it's ok to request the same modifier across platforms.
Comment 13 Miloslav Metelka 2012-06-13 19:20:20 UTC
*** Bug 208594 has been marked as a duplicate of this bug. ***
Comment 14 swpalmer 2012-08-23 13:43:08 UTC
Changing this binding was a bad idea.  The ctrl+scroll behaviour was well established in other applications (e.g. web browsers, other editors).  I for one have never had a problem with it.
Since there was a workaround for those that were bothered by it, the defacto-standard should have been left as the default.
Comment 15 emi 2012-08-24 07:17:30 UTC
(In reply to comment #14)
> Changing this binding was a bad idea.  The ctrl+scroll behaviour was well
> established in other applications (e.g. web browsers, other editors).  I for
> one have never had a problem with it.
> Since there was a workaround for those that were bothered by it, the
> defacto-standard should have been left as the default.

This was mostly an OSX issue. I think it might have been changed for all the platforms just to keep it consistent.
Comment 16 Milutin Kristofic 2012-11-06 16:49:52 UTC
*** Bug 221489 has been marked as a duplicate of this bug. ***