summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorHanif Bin Ariffin <hanif.ariffin.4326@gmail.com>2019-10-03 14:30:33 -0400
committerHanif Bin Ariffin <hanif.ariffin.4326@gmail.com>2019-10-04 07:20:18 -0400
commit79e83b7c929728545d66cfb6962f7a59babc7c4b (patch)
treea18884509b952524d49dec9b8d321effa4107675 /editor
parentd86c9ef2e691ced51175136b42a9cce2a8c54227 (diff)
Fixed warnings text using custom font and color setting.
Fixes #31917 Added missing font and color override.
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_fonts.cpp1
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index 55cae35a4a..b6d27d84e0 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -232,6 +232,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
// Default font
MAKE_DEFAULT_FONT(df, default_font_size);
p_theme->set_default_theme_font(df);
+ p_theme->set_font("main", "EditorFonts", df);
// Bold font
MAKE_BOLD_FONT(df_bold, default_font_size);
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index b1e8ce20d6..b7d36ce75a 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -5135,6 +5135,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
warning_child_of_container = memnew(Label);
warning_child_of_container->hide();
warning_child_of_container->set_text(TTR("Warning: Children of a container get their position and size determined only by their parent."));
+ warning_child_of_container->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("warning_color", "Editor"));
+ warning_child_of_container->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("main", "EditorFonts"));
add_control_to_info_overlay(warning_child_of_container);
h_scroll = memnew(HScrollBar);