diff options
| -rw-r--r-- | enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java b/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java index 61b48ce8..8f020b8a 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java +++ b/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java | |||
| @@ -99,6 +99,10 @@ public class EditorPanel { | |||
| 99 | DefaultSyntaxKit kit = (DefaultSyntaxKit) this.editor.getEditorKit(); | 99 | DefaultSyntaxKit kit = (DefaultSyntaxKit) this.editor.getEditorKit(); |
| 100 | kit.toggleComponent(this.editor, "de.sciss.syntaxpane.components.TokenMarker"); | 100 | kit.toggleComponent(this.editor, "de.sciss.syntaxpane.components.TokenMarker"); |
| 101 | 101 | ||
| 102 | // set unit increment to height of one line, the amount scrolled per | ||
| 103 | // mouse wheel rotation is then controlled by OS settings | ||
| 104 | this.editorScrollPane.getVerticalScrollBar().setUnitIncrement(this.editor.getFontMetrics(this.editor.getFont()).getHeight()); | ||
| 105 | |||
| 102 | // init editor popup menu | 106 | // init editor popup menu |
| 103 | this.popupMenu = new EditorPopupMenu(this, gui); | 107 | this.popupMenu = new EditorPopupMenu(this, gui); |
| 104 | this.editor.setComponentPopupMenu(this.popupMenu.getUi()); | 108 | this.editor.setComponentPopupMenu(this.popupMenu.getUi()); |