summaryrefslogtreecommitdiffstats
path: root/editor/plugins/script_text_editor.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-11-28 09:03:15 +0100
committerGitHub <noreply@github.com>2020-11-28 09:03:15 +0100
commita6751e6c58e73d6b8d04e98bba5fb6e380fdf34f (patch)
treebf22de8b8d89dee6a3b59c22adacff8f62a8d5eb /editor/plugins/script_text_editor.cpp
parentbd846001327dacd35a84b0759f8b7ca8b892e841 (diff)
parent7e2c0ffd1a19d5806a7fcf57e25d2465f7a8f8b6 (diff)
downloadredot-engine-a6751e6c58e73d6b8d04e98bba5fb6e380fdf34f.tar.gz
Merge pull request #41100 from bruvzg/ctl_text_server_interface
[Complex Text Layouts] Implement TextServer interface.
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r--editor/plugins/script_text_editor.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 7feb7cb3d3..fbd3612c72 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -912,6 +912,7 @@ void ScriptTextEditor::update_toggle_scripts_button() {
void ScriptTextEditor::_update_connected_methods() {
CodeEdit *text_edit = code_editor->get_text_editor();
+ text_edit->set_gutter_width(connection_gutter, text_edit->get_row_height());
for (int i = 0; i < text_edit->get_line_count(); i++) {
if (text_edit->get_line_gutter_metadata(i, connection_gutter) == "") {
continue;
@@ -1352,7 +1353,8 @@ void ScriptTextEditor::_change_syntax_highlighter(int p_idx) {
void ScriptTextEditor::_notification(int p_what) {
switch (p_what) {
- case NOTIFICATION_THEME_CHANGED: {
+ case NOTIFICATION_THEME_CHANGED:
+ case NOTIFICATION_ENTER_TREE: {
code_editor->get_text_editor()->set_gutter_width(connection_gutter, code_editor->get_text_editor()->get_row_height());
} break;
default:
@@ -1697,6 +1699,8 @@ void ScriptTextEditor::_enable_code_editor() {
editor_box->add_child(warnings_panel);
warnings_panel->add_theme_font_override(
"normal_font", EditorNode::get_singleton()->get_gui_base()->get_theme_font("main", "EditorFonts"));
+ warnings_panel->add_theme_font_size_override(
+ "normal_font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size("main_size", "EditorFonts"));
warnings_panel->connect("meta_clicked", callable_mp(this, &ScriptTextEditor::_warning_clicked));
add_child(context_menu);