Rename internal Button icon to button_icon to match exposed methods

This commit is contained in:
Aaron Franke
2024-10-09 15:21:47 -07:00
parent 0debc73dc6
commit 562c666e3d
129 changed files with 718 additions and 718 deletions

View File

@ -61,11 +61,11 @@ void EditorResourcePicker::_update_resource() {
assign_button->set_custom_minimum_size(assign_button_min_size);
if (edited_resource == Ref<Resource>()) {
assign_button->set_icon(Ref<Texture2D>());
assign_button->set_button_icon(Ref<Texture2D>());
assign_button->set_text(TTR("<empty>"));
assign_button->set_tooltip_text("");
} else {
assign_button->set_icon(EditorNode::get_singleton()->get_object_icon(edited_resource.operator->(), SNAME("Object")));
assign_button->set_button_icon(EditorNode::get_singleton()->get_object_icon(edited_resource.operator->(), SNAME("Object")));
if (!edited_resource->get_name().is_empty()) {
assign_button->set_text(edited_resource->get_name());
@ -103,7 +103,7 @@ void EditorResourcePicker::_update_resource_preview(const String &p_path, const
}
if (p_preview.is_valid()) {
preview_rect->set_offset(SIDE_LEFT, assign_button->get_icon()->get_width() + assign_button->get_theme_stylebox(CoreStringName(normal))->get_content_margin(SIDE_LEFT) + get_theme_constant(SNAME("h_separation"), SNAME("Button")));
preview_rect->set_offset(SIDE_LEFT, assign_button->get_button_icon()->get_width() + assign_button->get_theme_stylebox(CoreStringName(normal))->get_content_margin(SIDE_LEFT) + get_theme_constant(SNAME("h_separation"), SNAME("Button")));
// Resource-specific stretching.
if (Ref<GradientTexture1D>(edited_resource).is_valid() || Ref<Gradient>(edited_resource).is_valid()) {
@ -831,7 +831,7 @@ void EditorResourcePicker::_notification(int p_what) {
edit_menu->add_theme_constant_override("icon_max_width", icon_width);
}
edit_button->set_icon(get_theme_icon(SNAME("select_arrow"), SNAME("Tree")));
edit_button->set_button_icon(get_theme_icon(SNAME("select_arrow"), SNAME("Tree")));
} break;
case NOTIFICATION_DRAW: {