diff options
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r-- | editor/editor_properties.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 523e65babe..972fd0723a 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -2356,7 +2356,7 @@ void EditorPropertyResource::_file_selected(const String &p_path) { property_types = E->get().hint_string; } } - if (!property_types.empty()) { + if (!property_types.is_empty()) { bool any_type_matches = false; const Vector<String> split_property_types = property_types.split(","); for (int i = 0; i < split_property_types.size(); ++i) { @@ -2514,7 +2514,7 @@ void EditorPropertyResource::_menu_option(int p_which) { update_property(); break; } - ERR_FAIL_COND(inheritors_array.empty()); + ERR_FAIL_COND(inheritors_array.is_empty()); String intype = inheritors_array[p_which - TYPE_BASE_ID]; @@ -2590,7 +2590,7 @@ void EditorPropertyResource::_resource_preview(const String &p_path, const Ref<T } if (p_preview.is_valid()) { - preview->set_margin(MARGIN_LEFT, assign->get_icon()->get_width() + assign->get_theme_stylebox("normal")->get_default_margin(MARGIN_LEFT) + get_theme_constant("hseparation", "Button")); + preview->set_offset(SIDE_LEFT, assign->get_icon()->get_width() + assign->get_theme_stylebox("normal")->get_default_margin(SIDE_LEFT) + get_theme_constant("hseparation", "Button")); if (type == "GradientTexture") { preview->set_stretch_mode(TextureRect::STRETCH_SCALE); assign->set_custom_minimum_size(Size2(1, 1)); @@ -2658,7 +2658,7 @@ void EditorPropertyResource::_update_menu_items() { bool is_custom_resource = false; Ref<Texture2D> icon; - if (!custom_resources.empty()) { + if (!custom_resources.is_empty()) { for (int j = 0; j < custom_resources.size(); j++) { if (custom_resources[j].name == t) { is_custom_resource = true; @@ -3167,10 +3167,10 @@ EditorPropertyResource::EditorPropertyResource() { preview = memnew(TextureRect); preview->set_expand(true); - preview->set_anchors_and_margins_preset(PRESET_WIDE); - preview->set_margin(MARGIN_TOP, 1); - preview->set_margin(MARGIN_BOTTOM, -1); - preview->set_margin(MARGIN_RIGHT, -1); + preview->set_anchors_and_offsets_preset(PRESET_WIDE); + preview->set_offset(SIDE_TOP, 1); + preview->set_offset(SIDE_BOTTOM, -1); + preview->set_offset(SIDE_RIGHT, -1); assign->add_child(preview); assign->connect("gui_input", callable_mp(this, &EditorPropertyResource::_button_input)); |