diff options
| author | RaphaelHunter | 2018-05-05 15:40:35 +0800 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-05-13 22:39:13 +0200 |
| commit | 4fbb460a02c5e51a6e0ff9430ab042087048f9bd (patch) | |
| tree | 2cb0af91fce5a794b5e65e7abdac4b8f32ed4252 /editor/code_editor.cpp | |
| parent | 4aad40d249a37e5ad245fae0372cd5099997df79 (diff) | |
| download | godot-4fbb460a02c5e51a6e0ff9430ab042087048f9bd.tar.gz godot-4fbb460a02c5e51a6e0ff9430ab042087048f9bd.tar.zst godot-4fbb460a02c5e51a6e0ff9430ab042087048f9bd.zip | |
Fix:code editor text size should change at least one each time, don't mind how you setting your display scale
(cherry picked from commit eeb05344267580a25bc59d3c363537ade363f82e)
Diffstat (limited to '')
| -rw-r--r-- | editor/code_editor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 70334c234..ed4d37c89 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -646,12 +646,12 @@ void CodeTextEditor::_text_editor_gui_input(const Ref<InputEvent> &p_event) { } void CodeTextEditor::_zoom_in() { - font_resize_val += EDSCALE; + font_resize_val += MAX(EDSCALE, 1.0f); _zoom_changed(); } void CodeTextEditor::_zoom_out() { - font_resize_val -= EDSCALE; + font_resize_val -= MAX(EDSCALE, 1.0f); _zoom_changed(); } |
