Use a fixed-width font for the expression evaluator

This commit is contained in:
Hugo Locurcio 2025-07-31 16:48:53 +02:00
parent 2a9ff39264
commit b625b40d92
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C

View file

@ -32,6 +32,7 @@
#include "editor/debugger/editor_debugger_inspector.h"
#include "editor/debugger/script_editor_debugger.h"
#include "editor/editor_string_names.h"
#include "scene/gui/button.h"
#include "scene/gui/check_box.h"
#include "scene/gui/line_edit.h"
@ -99,6 +100,10 @@ void EditorExpressionEvaluator::_notification(int p_what) {
EditorDebuggerNode::get_singleton()->connect("breaked", callable_mp(this, &EditorExpressionEvaluator::_on_debugger_breaked));
EditorDebuggerNode::get_singleton()->connect("clear_execution", callable_mp(this, &EditorExpressionEvaluator::_on_debugger_clear_execution));
} break;
case NOTIFICATION_THEME_CHANGED: {
expression_input->add_theme_font_override(SceneStringName(font), get_theme_font(SNAME("expression"), EditorStringName(EditorFonts)));
expression_input->add_theme_font_size_override(SceneStringName(font_size), get_theme_font_size(SNAME("expression_size"), EditorStringName(EditorFonts)));
} break;
}
}