From e7b0e7e35aedd85a11480654e353e53b02a6a031 Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 25 May 2022 01:38:13 +0200 Subject: Improve style of inspector buttons --- editor/plugins/texture_region_editor_plugin.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'editor/plugins') diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index 2b24ebaebd..79e09404a0 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -1141,8 +1141,7 @@ void EditorInspectorPluginTextureRegion::_region_edit(Object *p_object) { bool EditorInspectorPluginTextureRegion::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { if ((p_type == Variant::RECT2 || p_type == Variant::RECT2I)) { if (((Object::cast_to(p_object) || Object::cast_to(p_object) || Object::cast_to(p_object) || Object::cast_to(p_object)) && p_path == "region_rect") || (Object::cast_to(p_object) && p_path == "region")) { - Button *button = memnew(Button); - button->set_text(TTR("Edit Region")); + Button *button = EditorInspector::create_inspector_action_button(TTR("Edit Region")); button->set_icon(texture_region_editor->get_theme_icon(SNAME("RegionEdit"), SNAME("EditorIcons"))); button->connect("pressed", callable_mp(this, &EditorInspectorPluginTextureRegion::_region_edit), varray(p_object)); add_property_editor(p_path, button, true); -- cgit v1.2.3