Skip to content

Commit

Permalink
Fix typo in Control's theme icon look-up method
Browse files Browse the repository at this point in the history
Backported from godotengine#47544 where it was originally identified
  • Loading branch information
YuriSizov committed Jun 10, 2021
1 parent de1ba1f commit fddd09d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scene/gui/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit fddd09d

Please sign in to comment.