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 203245 - Patch for: Command to reset the zoom level - plugin available
Summary: Patch for: Command to reset the zoom level - plugin available
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 7.1
Hardware: PC Other
: P4 normal with 6 votes (vote)
Assignee: Miloslav Metelka
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2011-10-06 14:46 UTC by 280Z28
Modified: 2016-07-01 18:03 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed patch draft (3.74 KB, patch)
2013-03-21 23:34 UTC, markiewb
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 280Z28 2011-10-06 14:46:26 UTC
Currently the commands "Zoom In" and "Zoom Out" are available. It would be nice to also have a "Reset Zoom" or "Zoom 100%" command to complement these.
Comment 1 markiewb 2013-03-21 23:34:08 UTC
Created attachment 132924 [details]
Proposed patch draft

I like to propose the following patch to solve the issue.

The patch introduces the new editor action name "zoom-text-reset" and integrates it in the existing ZoomTextAction. It includes an API-Change because the name is defined in editor.lib2, which is used by editor.actions.

The code looks OK, but i wasn't able to run it because of some module-loading/dependency-issue that i couldn't resolve yet.

@NB-Dev: Please review and give it a try yourself.
Comment 2 Miloslav Metelka 2013-03-25 08:58:47 UTC
Thank you for the patch. mkristofic is currently working on some deeper integration of editor's zoom action with system zoom action so I'll let him to integrate to not clash with his changes.
Just a nitpick: in the patch we could retain the "delta" variable for all three cases just making delta = -currentZoom for the reset case. Since we recently switched to JDK7 we could even use switch-case over string literals ;-)
Comment 3 markiewb 2013-03-26 21:35:38 UTC
(In reply to comment #2)
> Thank you for the patch. mkristofic is currently working on some deeper
> integration of editor's zoom action with system zoom action so I'll let him to
> integrate to not clash with his changes.

Thank you for your feedback. When mkristofic is done, i could regenerate the patch if required. 

> Just a nitpick: in the patch we could retain the "delta" variable for all three
> cases just making delta = -currentZoom for the reset case. Since we recently
> switched to JDK7 we could even use switch-case over string literals ;-)

I will take this in account for the next patch.
Comment 4 markiewb 2014-03-13 13:42:23 UTC
Any news here? It is pending for at least 1 year.
Comment 5 markiewb 2014-03-22 15:40:57 UTC
BTW: In the meantime I created http://plugins.netbeans.org/plugin/53555/?show=true which supports reset zoom too
Comment 6 SebastianZ 2015-09-17 09:13:12 UTC
(In reply to Miloslav Metelka from comment #2)
> mkristofic is currently working on some deeper
> integration of editor's zoom action with system zoom action so I'll let him
> to integrate to not clash with his changes.

Did those changes already land? Even if not, is there something that speaks against applying Markie's patch?

Sebastian
Comment 7 markiewb 2016-07-01 18:03:02 UTC
Lowering prio to P4. A plugin exists