From fddd09de17d3271fb2c6df0e70640a546ca4cdd5 Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Thu, 10 Jun 2021 16:31:38 +0300 Subject: [PATCH] Fix typo in Control's theme icon look-up method Backported from #47544 where it was originally identified --- scene/gui/control.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index d705e741463..d4eaac62fa9 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -965,6 +965,7 @@ Color Control::get_color(const StringName &p_name, const StringName &p_node_type } StringName type = p_node_type ? p_node_type : get_class_name(); + // try with custom themes Control *theme_owner = data.theme_owner; @@ -1005,6 +1006,7 @@ int Control::get_constant(const StringName &p_name, const StringName &p_node_typ } StringName type = p_node_type ? p_node_type : get_class_name(); + // try with custom themes Control *theme_owner = data.theme_owner; @@ -1098,7 +1100,7 @@ bool Control::has_icon(const StringName &p_name, const StringName &p_node_type) } if (Theme::get_project_default().is_valid()) { - if (Theme::get_project_default()->has_color(p_name, type)) { + if (Theme::get_project_default()->has_icon(p_name, type)) { return true; } }