diff options
Diffstat (limited to 'editor')
21 files changed, 51 insertions, 51 deletions
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index c773f51342..b954c87476 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -378,7 +378,7 @@ void ConnectDialog::_advanced_pressed() { error_label->hide(); } else { set_min_size(Size2(600, 500) * EDSCALE); - set_size(Size2()); + reset_size(); connect_to_label->set_text(TTR("Connect to Script:")); tree->set_connect_to_script_mode(true); diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index e0d32756ca..b18c225f23 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -1420,7 +1420,7 @@ void ScriptEditorDebugger::_clear_errors_list() { // Right click on specific file(s) or folder(s). void ScriptEditorDebugger::_error_tree_item_rmb_selected(const Vector2 &p_pos) { item_menu->clear(); - item_menu->set_size(Size2(1, 1)); + item_menu->reset_size(); if (error_tree->is_anything_selected()) { item_menu->add_icon_item(get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons")), TTR("Copy Error"), ACTION_COPY_ERROR); diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index d07d77c112..f18284638f 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -270,7 +270,7 @@ DependencyEditor::DependencyEditor() { ///////////////////////////////////// void DependencyEditorOwners::_list_rmb_select(int p_item, const Vector2 &p_pos) { file_options->clear(); - file_options->set_size(Size2(1, 1)); + file_options->reset_size(); if (p_item >= 0) { file_options->add_item(TTR("Open"), FILE_OPEN); } @@ -464,7 +464,7 @@ void DependencyRemoveDialog::show(const Vector<String> &p_folders, const Vector< if (removed_deps.is_empty()) { owners->hide(); text->set_text(TTR("Remove the selected files from the project? (Cannot be undone.)\nDepending on your filesystem configuration, the files will either be moved to the system trash or deleted permanently.")); - set_size(Size2()); + reset_size(); popup_centered(); } else { _build_removed_dependency_tree(removed_deps); diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 021ab8b93b..2d7c31b64c 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -576,7 +576,7 @@ void EditorFileDialog::_item_dc_selected(int p_item) { void EditorFileDialog::_item_list_item_rmb_selected(int p_item, const Vector2 &p_pos) { // Right click on specific file(s) or folder(s). item_menu->clear(); - item_menu->set_size(Size2(1, 1)); + item_menu->reset_size(); // Allow specific actions only on one item. bool single_item_selected = item_list->get_selected_items().size() == 1; @@ -620,7 +620,7 @@ void EditorFileDialog::_item_list_rmb_clicked(const Vector2 &p_pos) { } item_menu->clear(); - item_menu->set_size(Size2(1, 1)); + item_menu->reset_size(); if (can_create_dir) { item_menu->add_icon_item(item_list->get_theme_icon(SNAME("folder"), SNAME("FileDialog")), TTR("New Folder..."), ITEM_MENU_NEW_FOLDER, KeyModifierMask::CMD | Key::N); @@ -1117,7 +1117,7 @@ void EditorFileDialog::_delete_items() { } } if (folders.size() + files.size() > 0) { - remove_dialog->set_size(Size2(1, 1)); + remove_dialog->reset_size(); remove_dialog->show(folders, files); } } diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 07e505adb4..2729b1eb3b 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -650,7 +650,7 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) { } else if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) { _update_popup(); menu->set_position(get_screen_position() + get_local_mouse_position()); - menu->set_size(Vector2(1, 1)); + menu->reset_size(); menu->popup(); select(); return; @@ -1556,7 +1556,7 @@ void EditorInspectorArray::_panel_gui_input(Ref<InputEvent> p_event, int p_index rmb_popup->set_item_disabled(OPTION_MOVE_UP, popup_array_index_pressed == 0); rmb_popup->set_item_disabled(OPTION_MOVE_DOWN, popup_array_index_pressed == count - 1); rmb_popup->set_position(mb->get_global_position()); - rmb_popup->set_size(Vector2()); + rmb_popup->reset_size(); rmb_popup->popup(); } } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 368b7e6ab3..12142048f0 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -4903,7 +4903,7 @@ void EditorNode::_update_layouts_menu() { editor_layouts->clear(); overridden_default_layout = -1; - editor_layouts->set_size(Vector2()); + editor_layouts->reset_size(); editor_layouts->add_shortcut(ED_SHORTCUT("layout/save", TTR("Save Layout")), SETTINGS_LAYOUT_SAVE); editor_layouts->add_shortcut(ED_SHORTCUT("layout/delete", TTR("Delete Layout")), SETTINGS_LAYOUT_DELETE); editor_layouts->add_separator(); @@ -5030,7 +5030,7 @@ void EditorNode::_scene_tab_input(const Ref<InputEvent> &p_input) { if (mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) { // context menu scene_tabs_context_menu->clear(); - scene_tabs_context_menu->set_size(Size2(1, 1)); + scene_tabs_context_menu->reset_size(); scene_tabs_context_menu->add_shortcut(ED_GET_SHORTCUT("editor/new_scene"), FILE_NEW_SCENE); if (scene_tabs->get_hovered_tab() >= 0) { diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index 2942ece409..f07a5ab523 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -409,7 +409,7 @@ void EditorSpinSlider::_draw_spin_slider() { Vector2 scale = get_global_transform_with_canvas().get_scale(); grabber->set_scale(scale); - grabber->set_size(Size2(0, 0)); + grabber->reset_size(); grabber->set_position(get_global_position() + (grabber_rect.get_center() - grabber->get_size() * 0.5) * scale); if (mousewheel_over_grabber) { diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 1dde157527..7ae3dcd44f 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -2507,7 +2507,7 @@ void FileSystemDock::_tree_rmb_select(const Vector2 &p_pos) { // Popup. if (!paths.is_empty()) { - tree_popup->set_size(Size2(1, 1)); + tree_popup->reset_size(); _file_and_folders_fill_popup(tree_popup, paths); tree_popup->set_position(tree->get_screen_position() + p_pos); tree_popup->popup(); @@ -2518,7 +2518,7 @@ void FileSystemDock::_tree_rmb_empty(const Vector2 &p_pos) { // Right click is pressed in the empty space of the tree. path = "res://"; tree_popup->clear(); - tree_popup->set_size(Size2(1, 1)); + tree_popup->reset_size(); tree_popup->add_icon_item(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")), TTR("New Folder..."), FILE_NEW_FOLDER); tree_popup->add_icon_item(get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")), TTR("New Scene..."), FILE_NEW_SCENE); tree_popup->add_icon_item(get_theme_icon(SNAME("Script"), SNAME("EditorIcons")), TTR("New Script..."), FILE_NEW_SCRIPT); @@ -2549,7 +2549,7 @@ void FileSystemDock::_file_list_rmb_select(int p_item, const Vector2 &p_pos) { // Popup. if (!paths.is_empty()) { file_list_popup->clear(); - file_list_popup->set_size(Size2(1, 1)); + file_list_popup->reset_size(); _file_and_folders_fill_popup(file_list_popup, paths, searched_string.length() == 0); file_list_popup->set_position(files->get_global_position() + p_pos); file_list_popup->popup(); @@ -2563,7 +2563,7 @@ void FileSystemDock::_file_list_rmb_pressed(const Vector2 &p_pos) { } file_list_popup->clear(); - file_list_popup->set_size(Size2(1, 1)); + file_list_popup->reset_size(); file_list_popup->add_icon_item(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")), TTR("New Folder..."), FILE_NEW_FOLDER); file_list_popup->add_icon_item(get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")), TTR("New Scene..."), FILE_NEW_SCENE); diff --git a/editor/import/dynamicfont_import_settings.cpp b/editor/import/dynamicfont_import_settings.cpp index 474c9d5296..45937e20bc 100644 --- a/editor/import/dynamicfont_import_settings.cpp +++ b/editor/import/dynamicfont_import_settings.cpp @@ -1160,7 +1160,7 @@ void DynamicFontImportSettings::_range_update(int32_t p_start, int32_t p_end) { void DynamicFontImportSettings::_lang_add() { menu_langs->set_position(lang_list->get_screen_transform().xform(lang_list->get_local_mouse_position())); - menu_langs->set_size(Vector2(1, 1)); + menu_langs->reset_size(); menu_langs->popup(); } @@ -1187,7 +1187,7 @@ void DynamicFontImportSettings::_lang_remove(Object *p_item, int p_column, int p void DynamicFontImportSettings::_script_add() { menu_scripts->set_position(script_list->get_screen_transform().xform(script_list->get_local_mouse_position())); - menu_scripts->set_size(Vector2(1, 1)); + menu_scripts->reset_size(); menu_scripts->popup(); } diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index 55ffbf9477..2aded41810 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -68,7 +68,7 @@ void AnimationNodeBlendTreeEditor::remove_custom_type(const Ref<Script> &p_scrip void AnimationNodeBlendTreeEditor::_update_options_menu(bool p_has_input_ports) { add_node->get_popup()->clear(); - add_node->get_popup()->set_size(Size2i(-1, -1)); + add_node->get_popup()->reset_size(); for (int i = 0; i < add_options.size(); i++) { if (p_has_input_ports && add_options[i].input_port_count == 0) { continue; diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 02756916a5..ecc404f903 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -877,7 +877,7 @@ void CanvasItemEditor::_selection_result_pressed(int p_result) { void CanvasItemEditor::_selection_menu_hide() { selection_results.clear(); selection_menu->clear(); - selection_menu->set_size(Vector2(0, 0)); + selection_menu->reset_size(); } void CanvasItemEditor::_add_node_pressed(int p_result) { @@ -2265,7 +2265,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) { } if (b.is_valid() && b->is_pressed() && b->get_button_index() == MouseButton::RIGHT) { - add_node_menu->set_size(Vector2(1, 1)); + add_node_menu->reset_size(); add_node_menu->set_position(get_screen_position() + b->get_position()); add_node_menu->popup(); node_create_position = transform.affine_inverse().xform((get_local_mouse_position())); diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 005cf27e8a..daf34903e6 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -383,7 +383,7 @@ void CurveEditor::open_context_menu(Vector2 pos) { _context_menu->add_submenu_item(TTR("Load Preset"), _presets_menu->get_name()); - _context_menu->set_size(Size2(0, 0)); + _context_menu->reset_size(); _context_menu->popup(); } diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index b74d229d3e..d6e6f0597a 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -860,7 +860,7 @@ void Node3DEditorViewport::_update_name() { } view_menu->set_text(name); - view_menu->set_size(Vector2(0, 0)); // resets the button size + view_menu->reset_size(); } void Node3DEditorViewport::_compute_edit(const Point2 &p_point) { @@ -3620,7 +3620,7 @@ void Node3DEditorViewport::_selection_result_pressed(int p_result) { void Node3DEditorViewport::_selection_menu_hide() { selection_results.clear(); selection_menu->clear(); - selection_menu->set_size(Vector2(0, 0)); + selection_menu->reset_size(); } void Node3DEditorViewport::set_can_preview(Camera3D *p_preview) { diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index e87d31f018..583862893c 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -3052,7 +3052,7 @@ void ScriptEditor::_make_script_list_context_menu() { context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/toggle_scripts_panel"), TOGGLE_SCRIPTS_PANEL); context_menu->set_position(get_global_transform().xform(get_local_mouse_position())); - context_menu->set_size(Vector2(1, 1)); + context_menu->reset_size(); context_menu->popup(); } diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 93adced59d..30a4cef8ca 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -550,7 +550,7 @@ void ScriptTextEditor::_validate_script() { void ScriptTextEditor::_update_bookmark_list() { bookmarks_menu->clear(); - bookmarks_menu->set_size(Size2(1, 1)); + bookmarks_menu->reset_size(); bookmarks_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE); bookmarks_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/remove_all_bookmarks"), BOOKMARK_REMOVE_ALL); @@ -702,7 +702,7 @@ void ScriptTextEditor::_code_complete_script(const String &p_code, List<ScriptCo void ScriptTextEditor::_update_breakpoint_list() { breakpoints_menu->clear(); - breakpoints_menu->set_size(Size2(1, 1)); + breakpoints_menu->reset_size(); breakpoints_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_breakpoint"), DEBUG_TOGGLE_BREAKPOINT); breakpoints_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/remove_all_breakpoints"), DEBUG_REMOVE_ALL_BREAKPOINTS); @@ -1689,7 +1689,7 @@ void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color, bool p context_menu->set_item_disabled(context_menu->get_item_index(EDIT_REDO), !tx->has_redo()); context_menu->set_position(get_global_transform().xform(p_pos)); - context_menu->set_size(Vector2(1, 1)); + context_menu->reset_size(); context_menu->popup(); } diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 6032267717..7c1fda77bb 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -646,7 +646,7 @@ void ShaderEditor::_make_context_menu(bool p_selection, Vector2 p_position) { context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE); context_menu->set_position(get_global_transform().xform(p_position)); - context_menu->set_size(Vector2(1, 1)); + context_menu->reset_size(); context_menu->popup(); } diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp index ebfe6c9ee3..e252792c43 100644 --- a/editor/plugins/text_editor.cpp +++ b/editor/plugins/text_editor.cpp @@ -508,7 +508,7 @@ void TextEditor::_make_context_menu(bool p_selection, bool p_can_fold, bool p_is context_menu->set_item_disabled(context_menu->get_item_index(EDIT_REDO), !tx->has_redo()); context_menu->set_position(get_global_transform().xform(p_position)); - context_menu->set_size(Vector2(1, 1)); + context_menu->reset_size(); context_menu->popup(); } diff --git a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp index 9e47a44b34..60a66ab954 100644 --- a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp +++ b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp @@ -34,7 +34,7 @@ void TileProxiesManagerDialog::_right_clicked(int p_item, Vector2 p_local_mouse_pos, Object *p_item_list) { ItemList *item_list = Object::cast_to<ItemList>(p_item_list); - popup_menu->set_size(Vector2(1, 1)); + popup_menu->reset_size(); popup_menu->set_position(get_position() + item_list->get_global_mouse_position()); popup_menu->popup(); } diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index a4706bf0d9..b1a9da9e26 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -132,7 +132,7 @@ void VisualShaderGraphPlugin::show_port_preview(VisualShader::Type p_type, int p if (links[p_node_id].preview_visible && !is_dirty() && links[p_node_id].preview_box != nullptr) { links[p_node_id].graph_node->remove_child(links[p_node_id].preview_box); memdelete(links[p_node_id].preview_box); - links[p_node_id].graph_node->set_size(Vector2(-1, -1)); + links[p_node_id].graph_node->reset_size(); links[p_node_id].preview_visible = false; } @@ -256,7 +256,7 @@ void VisualShaderGraphPlugin::update_node_size(int p_node_id) { if (!links.has(p_node_id)) { return; } - links[p_node_id].graph_node->set_size(Size2(-1, -1)); + links[p_node_id].graph_node->reset_size(); } void VisualShaderGraphPlugin::register_default_input_button(int p_node_id, int p_port_id, Button *p_button) { @@ -1976,7 +1976,7 @@ void VisualShaderEditor::_set_node_size(int p_type, int p_node, const Vector2 &p } gn->set_custom_minimum_size(size); - gn->set_size(Size2(1, 1)); + gn->reset_size(); if (!expression_node.is_null() && text_box) { Size2 box_size = size; @@ -1990,7 +1990,7 @@ void VisualShaderEditor::_set_node_size(int p_type, int p_node, const Vector2 &p box_size.y -= text_box->get_offset(SIDE_TOP); box_size.y -= 28 * EDSCALE; text_box->set_custom_minimum_size(box_size); - text_box->set_size(Size2(1, 1)); + text_box->reset_size(); } } } @@ -2038,8 +2038,8 @@ void VisualShaderEditor::_comment_title_popup_show(const Point2 &p_position, int } void VisualShaderEditor::_comment_title_text_changed(const String &p_new_text) { - comment_title_change_edit->set_size(Size2(-1, -1)); - comment_title_change_popup->set_size(Size2(-1, -1)); + comment_title_change_edit->reset_size(); + comment_title_change_popup->reset_size(); } void VisualShaderEditor::_comment_title_text_submitted(const String &p_new_text) { @@ -2083,8 +2083,8 @@ void VisualShaderEditor::_comment_desc_popup_show(const Point2 &p_position, int } void VisualShaderEditor::_comment_desc_text_changed() { - comment_desc_change_edit->set_size(Size2(-1, -1)); - comment_desc_change_popup->set_size(Size2(-1, -1)); + comment_desc_change_edit->reset_size(); + comment_desc_change_popup->reset_size(); } void VisualShaderEditor::_comment_desc_confirm() { @@ -3167,7 +3167,7 @@ void VisualShaderEditor::_graph_gui_input(const Ref<InputEvent> &p_event) { menu_point = graph->get_local_mouse_position(); Point2 gpos = Input::get_singleton()->get_mouse_position(); popup_menu->set_position(gpos); - popup_menu->set_size(Size2(-1, -1)); + popup_menu->reset_size(); popup_menu->popup(); } } @@ -4258,8 +4258,8 @@ VisualShaderEditor::VisualShaderEditor() { comment_title_change_edit->connect("text_changed", callable_mp(this, &VisualShaderEditor::_comment_title_text_changed)); comment_title_change_edit->connect("text_submitted", callable_mp(this, &VisualShaderEditor::_comment_title_text_submitted)); comment_title_change_popup->add_child(comment_title_change_edit); - comment_title_change_edit->set_size(Size2(-1, -1)); - comment_title_change_popup->set_size(Size2(-1, -1)); + comment_title_change_edit->reset_size(); + comment_title_change_popup->reset_size(); comment_title_change_popup->connect("focus_exited", callable_mp(this, &VisualShaderEditor::_comment_title_popup_focus_out)); comment_title_change_popup->connect("popup_hide", callable_mp(this, &VisualShaderEditor::_comment_title_popup_hide)); add_child(comment_title_change_popup); @@ -4271,8 +4271,8 @@ VisualShaderEditor::VisualShaderEditor() { comment_desc_change_edit->connect("text_changed", callable_mp(this, &VisualShaderEditor::_comment_desc_text_changed)); comment_desc_vbox->add_child(comment_desc_change_edit); comment_desc_change_edit->set_custom_minimum_size(Size2(300 * EDSCALE, 150 * EDSCALE)); - comment_desc_change_edit->set_size(Size2(-1, -1)); - comment_desc_change_popup->set_size(Size2(-1, -1)); + comment_desc_change_edit->reset_size(); + comment_desc_change_popup->reset_size(); comment_desc_change_popup->connect("focus_exited", callable_mp(this, &VisualShaderEditor::_comment_desc_confirm)); comment_desc_change_popup->connect("popup_hide", callable_mp(this, &VisualShaderEditor::_comment_desc_popup_hide)); Button *comment_desc_confirm_button = memnew(Button); diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index f10ecab34e..061f4d218a 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -312,7 +312,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: spinbox->hide(); slider->hide(); menu->clear(); - menu->set_size(Size2(1, 1) * EDSCALE); + menu->reset_size(); for (int i = 0; i < MAX_VALUE_EDITORS; i++) { if (i < MAX_VALUE_EDITORS / 4) { diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 0b293c9caf..611038a947 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -899,7 +899,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { // Resize the dialog to its minimum size. // This prevents the dialog from being too wide after displaying // a deletion confirmation for a node with a long name. - delete_dialog->set_size(Size2()); + delete_dialog->reset_size(); delete_dialog->popup_centered(); } @@ -2575,7 +2575,7 @@ void SceneTreeDock::_files_dropped(Vector<String> p_files, NodePath p_to, int p_ menu_properties->set_item_metadata(menu_properties->get_item_count() - 1, p); } - menu_properties->set_size(Size2(1, 1)); + menu_properties->reset_size(); menu_properties->set_position(get_screen_position() + get_local_mouse_position()); menu_properties->popup(); } else if (!valid_properties.is_empty()) { @@ -2667,7 +2667,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { menu->add_icon_shortcut(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/instance_scene"), TOOL_INSTANTIATE); } - menu->set_size(Size2(1, 1)); + menu->reset_size(); menu->set_position(get_screen_position() + p_menu_pos); menu->popup(); return; @@ -2690,7 +2690,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { if (profile_allow_editing) { subresources.clear(); menu_subresources->clear(); - menu_subresources->set_size(Size2(1, 1)); + menu_subresources->reset_size(); _add_children_to_popup(selection.front()->get(), 0); if (menu->get_item_count() > 0) { menu->add_separator(); @@ -2831,7 +2831,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { menu->add_separator(); menu->add_icon_shortcut(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), ED_SHORTCUT("scene_tree/delete", TTR("Delete Node(s)"), Key::KEY_DELETE), TOOL_ERASE); } - menu->set_size(Size2(1, 1)); + menu->reset_size(); menu->set_position(p_menu_pos); menu->popup(); } @@ -2843,7 +2843,7 @@ void SceneTreeDock::_open_tree_menu() { menu->add_check_item(TTR("Auto Expand to Selected"), TOOL_AUTO_EXPAND); menu->set_item_checked(menu->get_item_idx_from_text(TTR("Auto Expand to Selected")), EditorSettings::get_singleton()->get("docks/scene_tree/auto_expand_to_selected")); - menu->set_size(Size2(1, 1)); + menu->reset_size(); menu->set_position(get_screen_position() + get_local_mouse_position()); menu->popup(); } |