summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-02-19 21:28:55 +0100
committerGitHub <noreply@github.com>2018-02-19 21:28:55 +0100
commit2a723519c042e0a143807e0b3e6a7367bfcb02dc (patch)
treeb69ff271456b89472f824d36976c387366275f5b /editor
parent691d5d807c1aee94d3551a71c2461f3ec469662b (diff)
parent42fccfb0a520447ea19bdea89a01a5279c7987e4 (diff)
Merge pull request #16491 from Chaosus/update_status_bar_font
Make status bar label fonts updateable
Diffstat (limited to 'editor')
-rw-r--r--editor/code_editor.cpp10
-rw-r--r--editor/code_editor.h1
2 files changed, 10 insertions, 1 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 70334c2343..6d4d8658c1 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -771,6 +771,14 @@ void CodeTextEditor::set_error(const String &p_error) {
void CodeTextEditor::_update_font() {
text_editor->add_font_override("font", get_font("source", "EditorFonts"));
+
+ Ref<Font> status_bar_font = get_font("status_source", "EditorFonts");
+ int count = status_bar->get_child_count();
+ for (int i = 0; i < count; i++) {
+ Control *n = Object::cast_to<Control>(status_bar->get_child(i));
+ if (n)
+ n->add_font_override("font", status_bar_font);
+ }
}
void CodeTextEditor::_on_settings_change() {
@@ -851,7 +859,7 @@ CodeTextEditor::CodeTextEditor() {
text_editor->set_brace_matching(true);
text_editor->set_auto_indent(true);
- HBoxContainer *status_bar = memnew(HBoxContainer);
+ status_bar = memnew(HBoxContainer);
add_child(status_bar);
status_bar->set_h_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/code_editor.h b/editor/code_editor.h
index db2e25b922..ca1ac78f26 100644
--- a/editor/code_editor.h
+++ b/editor/code_editor.h
@@ -141,6 +141,7 @@ class CodeTextEditor : public VBoxContainer {
TextEdit *text_editor;
FindReplaceBar *find_replace_bar;
+ HBoxContainer *status_bar;
Label *line_nb;
Label *col_nb;