Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2016-09-16 10:00:54 +0000
committerTom Schindl2016-09-16 10:00:54 +0000
commit297a62f2bedc8ed9433210375826dd5f7b63503e (patch)
tree7f6be2fc9535f9c8df7b1956aba9302b877fb847
parent83d5286743720eeba155e8d9e8b2d95bb6fa7dfa (diff)
downloadorg.eclipse.efxclipse-297a62f2bedc8ed9433210375826dd5f7b63503e.tar.gz
org.eclipse.efxclipse-297a62f2bedc8ed9433210375826dd5f7b63503e.tar.xz
org.eclipse.efxclipse-297a62f2bedc8ed9433210375826dd5f7b63503e.zip
refs #9
- zoom in/out with numpad as well Change-Id: Icf49dc9d73e8d679e314022dc929b9dc2601a2e7
-rw-r--r--bundles/code/org.eclipse.fx.text.ui/src/org/eclipse/fx/text/ui/source/SourceViewer.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/bundles/code/org.eclipse.fx.text.ui/src/org/eclipse/fx/text/ui/source/SourceViewer.java b/bundles/code/org.eclipse.fx.text.ui/src/org/eclipse/fx/text/ui/source/SourceViewer.java
index 31d57516a..d0535f0f3 100644
--- a/bundles/code/org.eclipse.fx.text.ui/src/org/eclipse/fx/text/ui/source/SourceViewer.java
+++ b/bundles/code/org.eclipse.fx.text.ui/src/org/eclipse/fx/text/ui/source/SourceViewer.java
@@ -59,11 +59,16 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi
private void initSourceViewerActionMapping() {
this.actionMapping.map("Ctrl+Space", SourceTextEditActions.PROPOSAL_REQUEST); //$NON-NLS-1$
-
+
this.actionMapping.map("Ctrl+Plus", SourceTextEditActions.FONT_ZOOM_IN);
this.actionMapping.map("Ctrl+Minus", SourceTextEditActions.FONT_ZOOM_OUT);
this.actionMapping.map("Ctrl+0", SourceTextEditActions.FONT_ZOOM_RESET);
-
+
+ this.actionMapping.map("Ctrl+Add", SourceTextEditActions.FONT_ZOOM_IN);
+ this.actionMapping.map("Ctrl+Subtract", SourceTextEditActions.FONT_ZOOM_OUT);
+// this.actionMapping.map("Ctrl+NUMPAD0", SourceTextEditActions.FONT_ZOOM_RESET);
+
+
subscribeAction((action, context) -> {
if (action == SourceTextEditActions.FONT_ZOOM_IN) {
getTextWidget().setFontZoomFactor(getTextWidget().getFontZoomFactor() + 0.1);
@@ -77,10 +82,10 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi
getTextWidget().setFontZoomFactor(1.0);
return true;
}
-
+
return false;
});
-
+
super.getActionMapping().setOverride(actionMapping);
}

Back to the top