From 36ca3fea96dcf113b1d2c634e9843bba98c049de Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Thu, 3 Jun 2021 12:32:06 +0300 Subject: [PATCH] [3.x] Fix visibility issue with zoom label --- editor/plugins/canvas_item_editor_plugin.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 6f4fd1d291e..65890d7a7ec 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -51,6 +51,7 @@ #include "scene/gui/viewport_container.h" #include "scene/main/canvas_layer.h" #include "scene/main/viewport.h" +#include "scene/resources/dynamic_font.h" #include "scene/resources/packed_scene.h" #include @@ -4109,6 +4110,12 @@ void CanvasItemEditor::_notification(int p_what) { anchors_popup->add_icon_item(get_icon("ControlAlignWide", "EditorIcons"), TTR("Full Rect"), ANCHORS_PRESET_WIDE); anchor_mode_button->set_icon(get_icon("Anchor", "EditorIcons")); + + Ref font = zoom_reset->get_font("font")->duplicate(false); + font->set_outline_size(1); + font->set_outline_color(Color(0, 0, 0)); + zoom_reset->add_font_override("font", font); + zoom_reset->add_color_override("font_color", Color(1, 1, 1)); } if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {