소스 검색

Merge pull request #18628 from raphael10241024/patch

fix : code editor's text size should change at least one each time when you try to change it using shortcuts
Gilles Roudière 7 년 전
부모
커밋
801657f64e
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      editor/code_editor.cpp

+ 2 - 2
editor/code_editor.cpp

@@ -650,12 +650,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();
 }