From eeb05344267580a25bc59d3c363537ade363f82e Mon Sep 17 00:00:00 2001 From: RaphaelHunter Date: Sat, 5 May 2018 15:40:35 +0800 Subject: Fix:code editor text size should change at least one each time, don't mind how you setting your display scale --- editor/code_editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 19bcb28fa5..24e86770bf 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -650,12 +650,12 @@ void CodeTextEditor::_text_editor_gui_input(const Ref &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(); } -- cgit v1.2.3