浏览代码

Merge pull request #59301 from fire-forge/layout-preset-full-rect

Rémi Verschelde 3 年之前
父节点
当前提交
7fd29b5464
共有 49 个文件被更改,包括 106 次插入106 次删除
  1. 2 2
      doc/classes/Control.xml
  2. 1 1
      editor/action_map_editor.cpp
  3. 1 1
      editor/animation_bezier_editor.cpp
  4. 4 4
      editor/animation_track_editor.cpp
  5. 1 1
      editor/debugger/editor_performance_profiler.cpp
  6. 6 6
      editor/editor_node.cpp
  7. 1 1
      editor/editor_path.cpp
  8. 1 1
      editor/editor_resource_picker.cpp
  9. 1 1
      editor/editor_spin_slider.cpp
  10. 2 2
      editor/groups_editor.cpp
  11. 0 0
      editor/icons/ControlAlignFullRect.svg
  12. 2 2
      editor/plugins/animation_state_machine_editor.cpp
  13. 1 1
      editor/plugins/asset_library_editor_plugin.cpp
  14. 2 2
      editor/plugins/audio_stream_editor_plugin.cpp
  15. 4 4
      editor/plugins/canvas_item_editor_plugin.cpp
  16. 7 7
      editor/plugins/control_editor_plugin.cpp
  17. 3 3
      editor/plugins/control_editor_plugin.h
  18. 3 3
      editor/plugins/material_editor_plugin.cpp
  19. 1 1
      editor/plugins/mesh_editor_plugin.cpp
  20. 3 3
      editor/plugins/node_3d_editor_plugin.cpp
  21. 1 1
      editor/plugins/replication_editor_plugin.cpp
  22. 2 2
      editor/plugins/script_text_editor.cpp
  23. 2 2
      editor/plugins/shader_editor_plugin.cpp
  24. 1 1
      editor/plugins/style_box_editor_plugin.cpp
  25. 1 1
      editor/plugins/text_editor.cpp
  26. 1 1
      editor/plugins/texture_editor_plugin.cpp
  27. 1 1
      editor/plugins/theme_editor_plugin.cpp
  28. 1 1
      editor/plugins/theme_editor_preview.cpp
  29. 6 6
      editor/plugins/tiles/tile_atlas_view.cpp
  30. 2 2
      editor/plugins/tiles/tile_data_editors.cpp
  31. 3 3
      editor/plugins/tiles/tile_set_atlas_source_editor.cpp
  32. 2 2
      editor/progress_dialog.cpp
  33. 5 5
      editor/project_manager.cpp
  34. 3 3
      editor/property_editor.cpp
  35. 1 1
      editor/scene_create_dialog.cpp
  36. 1 1
      editor/scene_tree_dock.cpp
  37. 1 1
      modules/gridmap/editor/grid_map_editor_plugin.cpp
  38. 1 1
      modules/noise/editor/noise_editor_plugin.cpp
  39. 1 1
      modules/visual_script/editor/visual_script_editor.cpp
  40. 2 2
      scene/gui/color_picker.cpp
  41. 13 13
      scene/gui/control.cpp
  42. 1 1
      scene/gui/control.h
  43. 1 1
      scene/gui/file_dialog.cpp
  44. 1 1
      scene/gui/graph_edit.cpp
  45. 2 2
      scene/gui/popup_menu.cpp
  46. 1 1
      scene/gui/spin_box.cpp
  47. 1 1
      scene/gui/tab_container.cpp
  48. 1 1
      scene/gui/tree.cpp
  49. 1 1
      scene/main/viewport.cpp

+ 2 - 2
doc/classes/Control.xml

@@ -1281,8 +1281,8 @@
 		<constant name="PRESET_HCENTER_WIDE" value="14" enum="LayoutPreset">
 			Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with [method set_anchors_preset].
 		</constant>
-		<constant name="PRESET_WIDE" value="15" enum="LayoutPreset">
-			Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the [Control] will fit its parent control. This is equivalent to the "Full Rect" layout option in the editor. Use with [method set_anchors_preset].
+		<constant name="PRESET_FULL_RECT" value="15" enum="LayoutPreset">
+			Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the [Control] will fit its parent control. Use with [method set_anchors_preset].
 		</constant>
 		<constant name="PRESET_MODE_MINSIZE" value="0" enum="LayoutPresetMode">
 			The control will be resized to its minimum size.

+ 1 - 1
editor/action_map_editor.cpp

@@ -1199,7 +1199,7 @@ void ActionMapEditor::use_external_search_box(LineEdit *p_searchbox) {
 ActionMapEditor::ActionMapEditor() {
 	// Main Vbox Container
 	VBoxContainer *main_vbox = memnew(VBoxContainer);
-	main_vbox->set_anchors_and_offsets_preset(PRESET_WIDE);
+	main_vbox->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 	add_child(main_vbox);
 
 	HBoxContainer *top_hbox = memnew(HBoxContainer);

+ 1 - 1
editor/animation_bezier_editor.cpp

@@ -1593,7 +1593,7 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() {
 	play_position = memnew(Control);
 	play_position->set_mouse_filter(MOUSE_FILTER_PASS);
 	add_child(play_position);
-	play_position->set_anchors_and_offsets_preset(PRESET_WIDE);
+	play_position->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 	play_position->connect("draw", callable_mp(this, &AnimationBezierTrackEdit::_play_position_draw));
 	set_focus_mode(FOCUS_CLICK);
 

+ 4 - 4
editor/animation_track_editor.cpp

@@ -1890,7 +1890,7 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
 	play_position = memnew(Control);
 	play_position->set_mouse_filter(MOUSE_FILTER_PASS);
 	add_child(play_position);
-	play_position->set_anchors_and_offsets_preset(PRESET_WIDE);
+	play_position->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 	play_position->connect("draw", callable_mp(this, &AnimationTimelineEdit::_play_position_draw));
 
 	add_track = memnew(MenuButton);
@@ -2919,7 +2919,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
 			add_child(path_popup);
 			path = memnew(LineEdit);
 			path_popup->add_child(path);
-			path->set_anchors_and_offsets_preset(PRESET_WIDE);
+			path->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 			path->connect("text_submitted", callable_mp(this, &AnimationTrackEdit::_path_submitted));
 		}
 
@@ -3212,7 +3212,7 @@ AnimationTrackEdit::AnimationTrackEdit() {
 	play_position = memnew(Control);
 	play_position->set_mouse_filter(MOUSE_FILTER_PASS);
 	add_child(play_position);
-	play_position->set_anchors_and_offsets_preset(PRESET_WIDE);
+	play_position->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 	play_position->connect("draw", callable_mp(this, &AnimationTrackEdit::_play_position_draw));
 	set_focus_mode(FOCUS_CLICK);
 	set_mouse_filter(MOUSE_FILTER_PASS); // Scroll has to work too for selection.
@@ -6245,7 +6245,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
 	info_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
 	info_message->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
 	info_message->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
-	info_message->set_anchors_and_offsets_preset(PRESET_WIDE, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE);
+	info_message->set_anchors_and_offsets_preset(PRESET_FULL_RECT, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE);
 	main_panel->add_child(info_message);
 
 	timeline = memnew(AnimationTimelineEdit);

+ 1 - 1
editor/debugger/editor_performance_profiler.cpp

@@ -393,7 +393,7 @@ EditorPerformanceProfiler::EditorPerformanceProfiler() {
 	info_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
 	info_message->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
 	info_message->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
-	info_message->set_anchors_and_offsets_preset(PRESET_WIDE, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE);
+	info_message->set_anchors_and_offsets_preset(PRESET_FULL_RECT, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE);
 	monitor_draw->add_child(info_message);
 
 	for (int i = 0; i < Performance::MONITOR_MAX; i++) {

+ 6 - 6
editor/editor_node.cpp

@@ -4333,16 +4333,16 @@ void EditorNode::_dock_make_float() {
 	window->set_title(dock->get_name());
 	Panel *p = memnew(Panel);
 	p->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("PanelForeground"), SNAME("EditorStyles")));
-	p->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	p->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	window->add_child(p);
 	MarginContainer *margin = memnew(MarginContainer);
-	margin->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	margin->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	margin->add_theme_constant_override("margin_right", borders.width);
 	margin->add_theme_constant_override("margin_top", borders.height);
 	margin->add_theme_constant_override("margin_left", borders.width);
 	margin->add_theme_constant_override("margin_bottom", borders.height);
 	window->add_child(margin);
-	dock->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	dock->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	margin->add_child(dock);
 	window->set_wrap_controls(true);
 	window->set_size(dock_size);
@@ -6142,11 +6142,11 @@ EditorNode::EditorNode() {
 
 	theme_base = memnew(Control);
 	add_child(theme_base);
-	theme_base->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	theme_base->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 
 	gui_base = memnew(Panel);
 	theme_base->add_child(gui_base);
-	gui_base->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	gui_base->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 
 	theme_base->set_theme(theme);
 	gui_base->set_theme(theme);
@@ -6164,7 +6164,7 @@ EditorNode::EditorNode() {
 
 	main_vbox = memnew(VBoxContainer);
 	gui_base->add_child(main_vbox);
-	main_vbox->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 8);
+	main_vbox->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT, Control::PRESET_MODE_MINSIZE, 8);
 	main_vbox->add_theme_constant_override("separation", 8 * EDSCALE);
 
 	menu_hb = memnew(HBoxContainer);

+ 1 - 1
editor/editor_path.cpp

@@ -198,7 +198,7 @@ EditorPath::EditorPath(EditorSelectionHistory *p_history) {
 	history = p_history;
 
 	MarginContainer *main_mc = memnew(MarginContainer);
-	main_mc->set_anchors_and_offsets_preset(PRESET_WIDE);
+	main_mc->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 	main_mc->add_theme_constant_override("margin_left", 4 * EDSCALE);
 	main_mc->add_theme_constant_override("margin_right", 6 * EDSCALE);
 	add_child(main_mc);

+ 1 - 1
editor/editor_resource_picker.cpp

@@ -879,7 +879,7 @@ EditorResourcePicker::EditorResourcePicker() {
 
 	preview_rect = memnew(TextureRect);
 	preview_rect->set_ignore_texture_size(true);
-	preview_rect->set_anchors_and_offsets_preset(PRESET_WIDE);
+	preview_rect->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 	preview_rect->set_offset(SIDE_TOP, 1);
 	preview_rect->set_offset(SIDE_BOTTOM, -1);
 	preview_rect->set_offset(SIDE_RIGHT, -1);

+ 1 - 1
editor/editor_spin_slider.cpp

@@ -652,7 +652,7 @@ void EditorSpinSlider::_ensure_input_popup() {
 	value_input = memnew(LineEdit);
 	value_input_popup->add_child(value_input);
 	value_input_popup->set_wrap_controls(true);
-	value_input->set_anchors_and_offsets_preset(PRESET_WIDE);
+	value_input->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 	value_input_popup->connect("popup_hide", callable_mp(this, &EditorSpinSlider::_value_input_closed));
 	value_input->connect("text_submitted", callable_mp(this, &EditorSpinSlider::_value_input_submitted));
 	value_input->connect("focus_exited", callable_mp(this, &EditorSpinSlider::_value_focus_exited));

+ 2 - 2
editor/groups_editor.cpp

@@ -432,7 +432,7 @@ GroupDialog::GroupDialog() {
 
 	VBoxContainer *vbc = memnew(VBoxContainer);
 	add_child(vbc);
-	vbc->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_KEEP_SIZE, 8 * EDSCALE);
+	vbc->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT, Control::PRESET_MODE_KEEP_SIZE, 8 * EDSCALE);
 
 	HBoxContainer *hbc = memnew(HBoxContainer);
 	vbc->add_child(hbc);
@@ -562,7 +562,7 @@ GroupDialog::GroupDialog() {
 	group_empty->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
 	group_empty->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
 	nodes_to_remove->add_child(group_empty);
-	group_empty->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_KEEP_SIZE, 8 * EDSCALE);
+	group_empty->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT, Control::PRESET_MODE_KEEP_SIZE, 8 * EDSCALE);
 
 	set_title(TTR("Group Editor"));
 

+ 0 - 0
editor/icons/ControlAlignWide.svg → editor/icons/ControlAlignFullRect.svg


+ 2 - 2
editor/plugins/animation_state_machine_editor.cpp

@@ -1969,7 +1969,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
 	state_machine_play_pos = memnew(Control);
 	state_machine_draw->add_child(state_machine_play_pos);
 	state_machine_play_pos->set_mouse_filter(MOUSE_FILTER_PASS); //pass all to parent
-	state_machine_play_pos->set_anchors_and_offsets_preset(PRESET_WIDE);
+	state_machine_play_pos->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 	state_machine_play_pos->connect("draw", callable_mp(this, &AnimationNodeStateMachineEditor::_state_machine_pos_draw));
 
 	v_scroll = memnew(VScrollBar);
@@ -2022,7 +2022,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
 	add_child(name_edit_popup);
 	name_edit = memnew(LineEdit);
 	name_edit_popup->add_child(name_edit);
-	name_edit->set_anchors_and_offsets_preset(PRESET_WIDE);
+	name_edit->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 	name_edit->connect("text_submitted", callable_mp(this, &AnimationNodeStateMachineEditor::_name_edited));
 	name_edit->connect("focus_exited", callable_mp(this, &AnimationNodeStateMachineEditor::_name_edited_focus_out));
 

+ 1 - 1
editor/plugins/asset_library_editor_plugin.cpp

@@ -1616,7 +1616,7 @@ AssetLibraryEditorPlugin::AssetLibraryEditorPlugin() {
 	addon_library = memnew(EditorAssetLibrary);
 	addon_library->set_v_size_flags(Control::SIZE_EXPAND_FILL);
 	EditorNode::get_singleton()->get_main_control()->add_child(addon_library);
-	addon_library->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	addon_library->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	addon_library->hide();
 }
 

+ 2 - 2
editor/plugins/audio_stream_editor_plugin.cpp

@@ -213,7 +213,7 @@ AudioStreamEditor::AudioStreamEditor() {
 	add_child(_player);
 
 	VBoxContainer *vbox = memnew(VBoxContainer);
-	vbox->set_anchors_and_offsets_preset(PRESET_WIDE, PRESET_MODE_MINSIZE, 0);
+	vbox->set_anchors_and_offsets_preset(PRESET_FULL_RECT, PRESET_MODE_MINSIZE, 0);
 	add_child(vbox);
 
 	_preview = memnew(ColorRect);
@@ -222,7 +222,7 @@ AudioStreamEditor::AudioStreamEditor() {
 	vbox->add_child(_preview);
 
 	_indicator = memnew(Control);
-	_indicator->set_anchors_and_offsets_preset(PRESET_WIDE);
+	_indicator->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 	_indicator->connect("draw", callable_mp(this, &AudioStreamEditor::_draw_indicator));
 	_indicator->connect("gui_input", callable_mp(this, &AudioStreamEditor::_on_input_indicator));
 	_preview->add_child(_indicator);

+ 4 - 4
editor/plugins/canvas_item_editor_plugin.cpp

@@ -4981,7 +4981,7 @@ CanvasItemEditor::CanvasItemEditor() {
 
 	hb = memnew(HBoxContainer);
 	add_child(hb);
-	hb->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	hb->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 
 	bottom_split = memnew(VSplitContainer);
 	add_child(bottom_split);
@@ -5006,7 +5006,7 @@ CanvasItemEditor::CanvasItemEditor() {
 	SubViewportContainer *scene_tree = memnew(SubViewportContainer);
 	viewport_scrollable->add_child(scene_tree);
 	scene_tree->set_stretch(true);
-	scene_tree->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	scene_tree->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	scene_tree->add_child(EditorNode::get_singleton()->get_scene_root());
 
 	controls_vb = memnew(VBoxContainer);
@@ -5036,7 +5036,7 @@ CanvasItemEditor::CanvasItemEditor() {
 	viewport = memnew(CanvasItemEditorViewport(this));
 	viewport_scrollable->add_child(viewport);
 	viewport->set_mouse_filter(MOUSE_FILTER_PASS);
-	viewport->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	viewport->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	viewport->set_clip_contents(true);
 	viewport->set_focus_mode(FOCUS_ALL);
 	viewport->connect("draw", callable_mp(this, &CanvasItemEditor::_draw_viewport));
@@ -5425,7 +5425,7 @@ CanvasItemEditorPlugin::CanvasItemEditorPlugin() {
 	canvas_item_editor = memnew(CanvasItemEditor);
 	canvas_item_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
 	EditorNode::get_singleton()->get_main_control()->add_child(canvas_item_editor);
-	canvas_item_editor->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	canvas_item_editor->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	canvas_item_editor->hide();
 }
 

+ 7 - 7
editor/plugins/control_editor_plugin.cpp

@@ -479,7 +479,7 @@ void ControlEditorToolbar::_set_anchors_and_offsets_preset(Control::LayoutPreset
 				case PRESET_BOTTOM_WIDE:
 				case PRESET_VCENTER_WIDE:
 				case PRESET_HCENTER_WIDE:
-				case PRESET_WIDE:
+				case PRESET_FULL_RECT:
 					undo_redo->add_do_method(control, "set_offsets_preset", p_preset, Control::PRESET_MODE_MINSIZE);
 					break;
 			}
@@ -689,8 +689,8 @@ void ControlEditorToolbar::_popup_callback(int p_op) {
 		case ANCHORS_AND_OFFSETS_PRESET_HCENTER_WIDE: {
 			_set_anchors_and_offsets_preset(PRESET_HCENTER_WIDE);
 		} break;
-		case ANCHORS_AND_OFFSETS_PRESET_WIDE: {
-			_set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+		case ANCHORS_AND_OFFSETS_PRESET_FULL_RECT: {
+			_set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 		} break;
 		case ANCHORS_AND_OFFSETS_PRESET_KEEP_RATIO: {
 			_set_anchors_and_offsets_to_keep_ratio();
@@ -741,8 +741,8 @@ void ControlEditorToolbar::_popup_callback(int p_op) {
 		case ANCHORS_PRESET_HCENTER_WIDE: {
 			_set_anchors_preset(PRESET_HCENTER_WIDE);
 		} break;
-		case ANCHORS_PRESET_WIDE: {
-			_set_anchors_preset(Control::PRESET_WIDE);
+		case ANCHORS_PRESET_FULL_RECT: {
+			_set_anchors_preset(Control::PRESET_FULL_RECT);
 		} break;
 
 		case CONTAINERS_H_PRESET_FILL: {
@@ -840,7 +840,7 @@ void ControlEditorToolbar::_notification(int p_what) {
 			p->add_icon_item(get_theme_icon(SNAME("ControlAlignVCenterWide"), SNAME("EditorIcons")), TTR("VCenter Wide"), ANCHORS_AND_OFFSETS_PRESET_VCENTER_WIDE);
 			p->add_icon_item(get_theme_icon(SNAME("ControlAlignHCenterWide"), SNAME("EditorIcons")), TTR("HCenter Wide"), ANCHORS_AND_OFFSETS_PRESET_HCENTER_WIDE);
 			p->add_separator();
-			p->add_icon_item(get_theme_icon(SNAME("ControlAlignWide"), SNAME("EditorIcons")), TTR("Full Rect"), ANCHORS_AND_OFFSETS_PRESET_WIDE);
+			p->add_icon_item(get_theme_icon(SNAME("ControlAlignFullRect"), SNAME("EditorIcons")), TTR("Full Rect"), ANCHORS_AND_OFFSETS_PRESET_FULL_RECT);
 			p->add_icon_item(get_theme_icon(SNAME("Anchor"), SNAME("EditorIcons")), TTR("Keep Current Ratio"), ANCHORS_AND_OFFSETS_PRESET_KEEP_RATIO);
 			p->set_item_tooltip(19, TTR("Adjust anchors and offsets to match the current rect size."));
 
@@ -867,7 +867,7 @@ void ControlEditorToolbar::_notification(int p_what) {
 			anchors_popup->add_icon_item(get_theme_icon(SNAME("ControlAlignVCenterWide"), SNAME("EditorIcons")), TTR("VCenter Wide"), ANCHORS_PRESET_VCENTER_WIDE);
 			anchors_popup->add_icon_item(get_theme_icon(SNAME("ControlAlignHCenterWide"), SNAME("EditorIcons")), TTR("HCenter Wide"), ANCHORS_PRESET_HCENTER_WIDE);
 			anchors_popup->add_separator();
-			anchors_popup->add_icon_item(get_theme_icon(SNAME("ControlAlignWide"), SNAME("EditorIcons")), TTR("Full Rect"), ANCHORS_PRESET_WIDE);
+			anchors_popup->add_icon_item(get_theme_icon(SNAME("ControlAlignFullRect"), SNAME("EditorIcons")), TTR("Full Rect"), ANCHORS_PRESET_FULL_RECT);
 
 			anchor_mode_button->set_icon(get_theme_icon(SNAME("Anchor"), SNAME("EditorIcons")));
 

+ 3 - 3
editor/plugins/control_editor_plugin.h

@@ -147,7 +147,7 @@ class ControlEditorToolbar : public HBoxContainer {
 		ANCHORS_AND_OFFSETS_PRESET_BOTTOM_WIDE,
 		ANCHORS_AND_OFFSETS_PRESET_VCENTER_WIDE,
 		ANCHORS_AND_OFFSETS_PRESET_HCENTER_WIDE,
-		ANCHORS_AND_OFFSETS_PRESET_WIDE,
+		ANCHORS_AND_OFFSETS_PRESET_FULL_RECT,
 
 		ANCHORS_AND_OFFSETS_PRESET_KEEP_RATIO,
 
@@ -166,7 +166,7 @@ class ControlEditorToolbar : public HBoxContainer {
 		ANCHORS_PRESET_BOTTOM_WIDE,
 		ANCHORS_PRESET_VCENTER_WIDE,
 		ANCHORS_PRESET_HCENTER_WIDE,
-		ANCHORS_PRESET_WIDE,
+		ANCHORS_PRESET_FULL_RECT,
 
 		// Offsets Presets are not currently in use.
 		OFFSETS_PRESET_TOP_LEFT,
@@ -184,7 +184,7 @@ class ControlEditorToolbar : public HBoxContainer {
 		OFFSETS_PRESET_BOTTOM_WIDE,
 		OFFSETS_PRESET_VCENTER_WIDE,
 		OFFSETS_PRESET_HCENTER_WIDE,
-		OFFSETS_PRESET_WIDE,
+		OFFSETS_PRESET_FULL_RECT,
 
 		CONTAINERS_H_PRESET_FILL,
 		CONTAINERS_H_PRESET_FILL_EXPAND,

+ 3 - 3
editor/plugins/material_editor_plugin.cpp

@@ -130,7 +130,7 @@ MaterialEditor::MaterialEditor() {
 	layout_2d = memnew(HBoxContainer);
 	layout_2d->set_alignment(BoxContainer::ALIGNMENT_CENTER);
 	add_child(layout_2d);
-	layout_2d->set_anchors_and_offsets_preset(PRESET_WIDE);
+	layout_2d->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 
 	rect_instance = memnew(ColorRect);
 	layout_2d->add_child(rect_instance);
@@ -143,7 +143,7 @@ MaterialEditor::MaterialEditor() {
 	vc = memnew(SubViewportContainer);
 	vc->set_stretch(true);
 	add_child(vc);
-	vc->set_anchors_and_offsets_preset(PRESET_WIDE);
+	vc->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 	viewport = memnew(SubViewport);
 	Ref<World3D> world_3d;
 	world_3d.instantiate();
@@ -190,7 +190,7 @@ MaterialEditor::MaterialEditor() {
 
 	layout_3d = memnew(HBoxContainer);
 	add_child(layout_3d);
-	layout_3d->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 2);
+	layout_3d->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT, Control::PRESET_MODE_MINSIZE, 2);
 
 	VBoxContainer *vb_shape = memnew(VBoxContainer);
 	layout_3d->add_child(vb_shape);

+ 1 - 1
editor/plugins/mesh_editor_plugin.cpp

@@ -137,7 +137,7 @@ MeshEditor::MeshEditor() {
 
 	HBoxContainer *hb = memnew(HBoxContainer);
 	add_child(hb);
-	hb->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 2);
+	hb->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT, Control::PRESET_MODE_MINSIZE, 2);
 
 	hb->add_spacer();
 

+ 3 - 3
editor/plugins/node_3d_editor_plugin.cpp

@@ -4494,7 +4494,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
 	subviewport_container = c;
 	c->set_stretch(true);
 	add_child(c);
-	c->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	c->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	viewport = memnew(SubViewport);
 	viewport->set_disable_input(true);
 
@@ -4502,7 +4502,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
 	surface = memnew(Control);
 	surface->set_drag_forwarding(this);
 	add_child(surface);
-	surface->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	surface->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	surface->set_clip_contents(true);
 	camera = memnew(Camera3D);
 	camera->set_disable_gizmos(true);
@@ -7233,7 +7233,7 @@ void Node3DEditor::_toggle_maximize_view(Object *p_viewport) {
 	if (!maximized) {
 		for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
 			if (i == (uint32_t)index) {
-				viewports[i]->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+				viewports[i]->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 			} else {
 				viewports[i]->hide();
 			}

+ 1 - 1
editor/plugins/replication_editor_plugin.cpp

@@ -242,7 +242,7 @@ ReplicationEditor::ReplicationEditor() {
 	drop_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
 	drop_label->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
 	tree->add_child(drop_label);
-	drop_label->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	drop_label->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 
 	tree->set_drag_forwarding(this);
 }

+ 2 - 2
editor/plugins/script_text_editor.cpp

@@ -1821,7 +1821,7 @@ void ScriptTextEditor::_enable_code_editor() {
 
 	VSplitContainer *editor_box = memnew(VSplitContainer);
 	add_child(editor_box);
-	editor_box->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	editor_box->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	editor_box->set_v_size_flags(SIZE_EXPAND_FILL);
 
 	editor_box->add_child(code_editor);
@@ -1958,7 +1958,7 @@ void ScriptTextEditor::_enable_code_editor() {
 ScriptTextEditor::ScriptTextEditor() {
 	code_editor = memnew(CodeTextEditor);
 	code_editor->add_theme_constant_override("separation", 2);
-	code_editor->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	code_editor->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	code_editor->set_code_complete_func(_code_complete_scripts, this);
 	code_editor->set_v_size_flags(SIZE_EXPAND_FILL);
 

+ 2 - 2
editor/plugins/shader_editor_plugin.cpp

@@ -706,7 +706,7 @@ ShaderEditor::ShaderEditor() {
 	shader_editor = memnew(ShaderTextEditor);
 	shader_editor->set_v_size_flags(SIZE_EXPAND_FILL);
 	shader_editor->add_theme_constant_override("separation", 0);
-	shader_editor->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	shader_editor->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 
 	shader_editor->connect("show_warnings_panel", callable_mp(this, &ShaderEditor::_show_warnings_panel));
 	shader_editor->connect("script_changed", callable_mp(this, &ShaderEditor::apply_shaders));
@@ -797,7 +797,7 @@ ShaderEditor::ShaderEditor() {
 
 	VSplitContainer *editor_box = memnew(VSplitContainer);
 	main_container->add_child(editor_box);
-	editor_box->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	editor_box->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	editor_box->set_v_size_flags(SIZE_EXPAND_FILL);
 	editor_box->add_child(shader_editor);
 

+ 1 - 1
editor/plugins/style_box_editor_plugin.cpp

@@ -132,7 +132,7 @@ StyleBoxPreview::StyleBoxPreview() {
 	preview->set_clip_contents(true);
 	preview->connect("draw", callable_mp(this, &StyleBoxPreview::_redraw));
 	checkerboard->add_child(preview);
-	preview->set_anchors_and_offsets_preset(PRESET_WIDE);
+	preview->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 
 	add_margin_child(TTR("Preview:"), checkerboard);
 	grid_preview = memnew(TextureButton);

+ 1 - 1
editor/plugins/text_editor.cpp

@@ -524,7 +524,7 @@ TextEditor::TextEditor() {
 	code_editor->add_theme_constant_override("separation", 0);
 	code_editor->connect("load_theme_settings", callable_mp(this, &TextEditor::_load_theme_settings));
 	code_editor->connect("validate_script", callable_mp(this, &TextEditor::_validate_script));
-	code_editor->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	code_editor->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	code_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
 	code_editor->show_toggle_scripts_button();
 

+ 1 - 1
editor/plugins/texture_editor_plugin.cpp

@@ -124,7 +124,7 @@ TexturePreview::TexturePreview(Ref<Texture2D> p_texture, bool p_show_metadata) {
 
 	texture_display = memnew(TextureRect);
 	texture_display->set_texture(p_texture);
-	texture_display->set_anchors_preset(TextureRect::PRESET_WIDE);
+	texture_display->set_anchors_preset(TextureRect::PRESET_FULL_RECT);
 	texture_display->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED);
 	texture_display->set_ignore_texture_size(true);
 	add_child(texture_display);

+ 1 - 1
editor/plugins/theme_editor_plugin.cpp

@@ -2017,7 +2017,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
 	edit_items_tree->connect("button_clicked", callable_mp(this, &ThemeItemEditorDialog::_item_tree_button_pressed));
 
 	edit_items_message = memnew(Label);
-	edit_items_message->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	edit_items_message->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	edit_items_message->set_mouse_filter(Control::MOUSE_FILTER_STOP);
 	edit_items_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
 	edit_items_message->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);

+ 1 - 1
editor/plugins/theme_editor_preview.cpp

@@ -246,7 +246,7 @@ ThemeEditorPreview::ThemeEditorPreview() {
 	preview_root->set_h_size_flags(SIZE_EXPAND_FILL);
 
 	preview_bg = memnew(ColorRect);
-	preview_bg->set_anchors_and_offsets_preset(PRESET_WIDE);
+	preview_bg->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 	preview_bg->set_color(GLOBAL_GET("rendering/environment/defaults/default_clear_color"));
 	preview_root->add_child(preview_bg);
 

+ 6 - 6
editor/plugins/tiles/tile_atlas_view.cpp

@@ -544,7 +544,7 @@ TileAtlasView::TileAtlasView() {
 	Panel *panel = memnew(Panel);
 	panel->set_clip_contents(true);
 	panel->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
-	panel->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	panel->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	panel->set_h_size_flags(SIZE_EXPAND_FILL);
 	panel->set_v_size_flags(SIZE_EXPAND_FILL);
 	add_child(panel);
@@ -613,32 +613,32 @@ TileAtlasView::TileAtlasView() {
 
 	background_left = memnew(Control);
 	background_left->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
-	background_left->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	background_left->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	background_left->set_texture_repeat(TextureRepeat::TEXTURE_REPEAT_ENABLED);
 	background_left->connect("draw", callable_mp(this, &TileAtlasView::_draw_background_left));
 	base_tiles_root_control->add_child(background_left);
 
 	base_tiles_drawing_root = memnew(Control);
 	base_tiles_drawing_root->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
-	base_tiles_drawing_root->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	base_tiles_drawing_root->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	base_tiles_drawing_root->set_texture_filter(TEXTURE_FILTER_NEAREST);
 	base_tiles_root_control->add_child(base_tiles_drawing_root);
 
 	base_tiles_draw = memnew(Control);
 	base_tiles_draw->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
-	base_tiles_draw->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	base_tiles_draw->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	base_tiles_draw->connect("draw", callable_mp(this, &TileAtlasView::_draw_base_tiles));
 	base_tiles_drawing_root->add_child(base_tiles_draw);
 
 	base_tiles_texture_grid = memnew(Control);
 	base_tiles_texture_grid->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
-	base_tiles_texture_grid->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	base_tiles_texture_grid->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	base_tiles_texture_grid->connect("draw", callable_mp(this, &TileAtlasView::_draw_base_tiles_texture_grid));
 	base_tiles_drawing_root->add_child(base_tiles_texture_grid);
 
 	base_tiles_shape_grid = memnew(Control);
 	base_tiles_shape_grid->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
-	base_tiles_shape_grid->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	base_tiles_shape_grid->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	base_tiles_shape_grid->connect("draw", callable_mp(this, &TileAtlasView::_draw_base_tiles_shape_grid));
 	base_tiles_drawing_root->add_child(base_tiles_shape_grid);
 

+ 2 - 2
editor/plugins/tiles/tile_data_editors.cpp

@@ -803,13 +803,13 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
 	add_child(root);
 
 	panel = memnew(Panel);
-	panel->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	panel->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	panel->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
 	root->add_child(panel);
 
 	base_control = memnew(Control);
 	base_control->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST);
-	base_control->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	base_control->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	base_control->connect("draw", callable_mp(this, &GenericTilePolygonEditor::_base_control_draw));
 	base_control->connect("gui_input", callable_mp(this, &GenericTilePolygonEditor::_base_control_gui_input));
 	base_control->set_clip_contents(true);

+ 3 - 3
editor/plugins/tiles/tile_set_atlas_source_editor.cpp

@@ -2370,7 +2370,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
 
 	tile_data_editors_tree = memnew(Tree);
 	tile_data_editors_tree->set_hide_root(true);
-	tile_data_editors_tree->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	tile_data_editors_tree->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	tile_data_editors_tree->set_h_scroll_enabled(false);
 	tile_data_editors_tree->set_v_scroll_enabled(false);
 	tile_data_editors_tree->connect("item_selected", callable_mp(this, &TileSetAtlasSourceEditor::_tile_data_editors_tree_selected));
@@ -2509,7 +2509,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
 	tile_atlas_view->add_control_over_atlas_tiles(tile_atlas_control);
 
 	tile_atlas_control_unscaled = memnew(Control);
-	tile_atlas_control_unscaled->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	tile_atlas_control_unscaled->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	tile_atlas_control_unscaled->connect("draw", callable_mp(this, &TileSetAtlasSourceEditor::_tile_atlas_control_unscaled_draw));
 	tile_atlas_view->add_control_over_atlas_tiles(tile_atlas_control_unscaled, false);
 	tile_atlas_control_unscaled->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
@@ -2526,7 +2526,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
 	tile_atlas_view->add_control_over_alternative_tiles(alternative_tiles_control);
 
 	alternative_tiles_control_unscaled = memnew(Control);
-	alternative_tiles_control_unscaled->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	alternative_tiles_control_unscaled->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	alternative_tiles_control_unscaled->connect("draw", callable_mp(this, &TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw));
 	tile_atlas_view->add_control_over_alternative_tiles(alternative_tiles_control_unscaled, false);
 	alternative_tiles_control_unscaled->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);

+ 2 - 2
editor/progress_dialog.cpp

@@ -50,7 +50,7 @@ void BackgroundProgress::_add_task(const String &p_task, const String &p_label,
 	Control *ec = memnew(Control);
 	ec->set_h_size_flags(SIZE_EXPAND_FILL);
 	ec->set_v_size_flags(SIZE_EXPAND_FILL);
-	t.progress->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	t.progress->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	ec->add_child(t.progress);
 	ec->set_custom_minimum_size(Size2(80, 5) * EDSCALE);
 	t.hb->add_child(ec);
@@ -235,7 +235,7 @@ void ProgressDialog::_bind_methods() {
 ProgressDialog::ProgressDialog() {
 	main = memnew(VBoxContainer);
 	add_child(main);
-	main->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	main->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	set_exclusive(true);
 	last_progress_tick = 0;
 	singleton = this;

+ 5 - 5
editor/project_manager.cpp

@@ -2562,19 +2562,19 @@ ProjectManager::ProjectManager() {
 
 	EditorFileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files"));
 
-	set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	set_theme(create_custom_theme());
 
-	set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 
 	Panel *panel = memnew(Panel);
 	add_child(panel);
-	panel->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	panel->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("Background"), SNAME("EditorStyles")));
 
 	VBoxContainer *vb = memnew(VBoxContainer);
 	panel->add_child(vb);
-	vb->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 8 * EDSCALE);
+	vb->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT, Control::PRESET_MODE_MINSIZE, 8 * EDSCALE);
 
 	Control *center_box = memnew(Control);
 	center_box->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -2582,7 +2582,7 @@ ProjectManager::ProjectManager() {
 
 	tabs = memnew(TabContainer);
 	center_box->add_child(tabs);
-	tabs->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	tabs->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	tabs->connect("tab_changed", callable_mp(this, &ProjectManager::_on_tab_changed));
 
 	local_projects_hb = memnew(HBoxContainer);

+ 3 - 3
editor/property_editor.cpp

@@ -1826,7 +1826,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
 
 	text_edit = memnew(TextEdit);
 	value_vbox->add_child(text_edit);
-	text_edit->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5);
+	text_edit->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT, Control::PRESET_MODE_MINSIZE, 5);
 	text_edit->set_v_size_flags(Control::SIZE_EXPAND_FILL);
 	text_edit->set_offset(SIDE_BOTTOM, -30);
 
@@ -1882,12 +1882,12 @@ CustomPropertyEditor::CustomPropertyEditor() {
 
 	spinbox = memnew(SpinBox);
 	value_vbox->add_child(spinbox);
-	spinbox->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5);
+	spinbox->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT, Control::PRESET_MODE_MINSIZE, 5);
 	spinbox->connect("value_changed", callable_mp(this, &CustomPropertyEditor::_range_modified));
 
 	slider = memnew(HSlider);
 	value_vbox->add_child(slider);
-	slider->set_anchors_and_offsets_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5);
+	slider->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT, Control::PRESET_MODE_MINSIZE, 5);
 	slider->connect("value_changed", callable_mp(this, &CustomPropertyEditor::_range_modified));
 
 	action_hboxes = memnew(HBoxContainer);

+ 1 - 1
editor/scene_create_dialog.cpp

@@ -171,7 +171,7 @@ Node *SceneCreateDialog::create_scene_root() {
 			break;
 		case ROOT_USER_INTERFACE: {
 			Control *gui = memnew(Control);
-			gui->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+			gui->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 			root = gui;
 		} break;
 		case ROOT_OTHER:

+ 1 - 1
editor/scene_tree_dock.cpp

@@ -1122,7 +1122,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
 						break;
 					case TOOL_CREATE_USER_INTERFACE: {
 						Control *node = memnew(Control);
-						node->set_anchors_and_offsets_preset(PRESET_WIDE); //more useful for resizable UIs.
+						node->set_anchors_and_offsets_preset(PRESET_FULL_RECT); //more useful for resizable UIs.
 						new_node = node;
 
 					} break;

+ 1 - 1
modules/gridmap/editor/grid_map_editor_plugin.cpp

@@ -1262,7 +1262,7 @@ GridMapEditor::GridMapEditor() {
 	info_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
 	info_message->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
 	info_message->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
-	info_message->set_anchors_and_offsets_preset(PRESET_WIDE, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE);
+	info_message->set_anchors_and_offsets_preset(PRESET_FULL_RECT, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE);
 	mesh_library_palette->add_child(info_message);
 
 	edit_axis = Vector3::AXIS_Y;

+ 1 - 1
modules/noise/editor/noise_editor_plugin.cpp

@@ -54,7 +54,7 @@ public:
 		set_custom_minimum_size(Size2(0, EDSCALE * PREVIEW_HEIGHT));
 
 		_texture_rect = memnew(TextureRect);
-		_texture_rect->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+		_texture_rect->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 		_texture_rect->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_COVERED);
 		add_child(_texture_rect);
 

+ 1 - 1
modules/visual_script/editor/visual_script_editor.cpp

@@ -4628,7 +4628,7 @@ VisualScriptEditor::VisualScriptEditor() {
 	graph = memnew(GraphEdit);
 	add_child(graph);
 	graph->set_v_size_flags(Control::SIZE_EXPAND_FILL);
-	graph->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	graph->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	graph->set_show_zoom_label(true);
 	graph->connect("node_selected", callable_mp(this, &VisualScriptEditor::_node_selected));
 	graph->connect("begin_node_move", callable_mp(this, &VisualScriptEditor::_begin_node_move));

+ 2 - 2
scene/gui/color_picker.cpp

@@ -1071,7 +1071,7 @@ void ColorPicker::_screen_pick_pressed() {
 		screen = memnew(Control);
 		r->add_child(screen);
 		screen->set_as_top_level(true);
-		screen->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+		screen->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 		screen->set_default_cursor_shape(CURSOR_POINTING_HAND);
 		screen->connect("gui_input", callable_mp(this, &ColorPicker::_screen_input));
 		// It immediately toggles off in the first press otherwise.
@@ -1456,7 +1456,7 @@ void ColorPickerButton::_update_picker() {
 		popup = memnew(PopupPanel);
 		popup->set_wrap_controls(true);
 		picker = memnew(ColorPicker);
-		picker->set_anchors_and_offsets_preset(PRESET_WIDE);
+		picker->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 		popup->add_child(picker);
 		add_child(popup, false, INTERNAL_MODE_FRONT);
 		picker->connect("color_changed", callable_mp(this, &ColorPickerButton::_color_changed));

+ 13 - 13
scene/gui/control.cpp

@@ -1642,7 +1642,7 @@ void Control::_set_anchors_layout_preset(int p_preset) {
 		case PRESET_BOTTOM_WIDE:
 		case PRESET_VCENTER_WIDE:
 		case PRESET_HCENTER_WIDE:
-		case PRESET_WIDE:
+		case PRESET_FULL_RECT:
 			set_offsets_preset(preset, LayoutPresetMode::PRESET_MODE_MINSIZE);
 			break;
 	}
@@ -1718,7 +1718,7 @@ int Control::_get_anchors_layout_preset() const {
 	}
 
 	if (left == ANCHOR_BEGIN && right == ANCHOR_END && top == ANCHOR_BEGIN && bottom == ANCHOR_END) {
-		return (int)LayoutPreset::PRESET_WIDE;
+		return (int)LayoutPreset::PRESET_FULL_RECT;
 	}
 
 	// Does not match any preset, return "Custom".
@@ -1737,7 +1737,7 @@ void Control::set_anchors_preset(LayoutPreset p_preset, bool p_keep_offsets) {
 		case PRESET_BOTTOM_WIDE:
 		case PRESET_LEFT_WIDE:
 		case PRESET_HCENTER_WIDE:
-		case PRESET_WIDE:
+		case PRESET_FULL_RECT:
 			set_anchor(SIDE_LEFT, ANCHOR_BEGIN, p_keep_offsets);
 			break;
 
@@ -1765,7 +1765,7 @@ void Control::set_anchors_preset(LayoutPreset p_preset, bool p_keep_offsets) {
 		case PRESET_RIGHT_WIDE:
 		case PRESET_TOP_WIDE:
 		case PRESET_VCENTER_WIDE:
-		case PRESET_WIDE:
+		case PRESET_FULL_RECT:
 			set_anchor(SIDE_TOP, ANCHOR_BEGIN, p_keep_offsets);
 			break;
 
@@ -1807,7 +1807,7 @@ void Control::set_anchors_preset(LayoutPreset p_preset, bool p_keep_offsets) {
 		case PRESET_RIGHT_WIDE:
 		case PRESET_BOTTOM_WIDE:
 		case PRESET_HCENTER_WIDE:
-		case PRESET_WIDE:
+		case PRESET_FULL_RECT:
 			set_anchor(SIDE_RIGHT, ANCHOR_END, p_keep_offsets);
 			break;
 	}
@@ -1835,7 +1835,7 @@ void Control::set_anchors_preset(LayoutPreset p_preset, bool p_keep_offsets) {
 		case PRESET_RIGHT_WIDE:
 		case PRESET_BOTTOM_WIDE:
 		case PRESET_VCENTER_WIDE:
-		case PRESET_WIDE:
+		case PRESET_FULL_RECT:
 			set_anchor(SIDE_BOTTOM, ANCHOR_END, p_keep_offsets);
 			break;
 	}
@@ -1870,7 +1870,7 @@ void Control::set_offsets_preset(LayoutPreset p_preset, LayoutPresetMode p_resiz
 		case PRESET_BOTTOM_WIDE:
 		case PRESET_LEFT_WIDE:
 		case PRESET_HCENTER_WIDE:
-		case PRESET_WIDE:
+		case PRESET_FULL_RECT:
 			data.offset[0] = x * (0.0 - data.anchor[0]) + p_margin + parent_rect.position.x;
 			break;
 
@@ -1898,7 +1898,7 @@ void Control::set_offsets_preset(LayoutPreset p_preset, LayoutPresetMode p_resiz
 		case PRESET_RIGHT_WIDE:
 		case PRESET_TOP_WIDE:
 		case PRESET_VCENTER_WIDE:
-		case PRESET_WIDE:
+		case PRESET_FULL_RECT:
 			data.offset[1] = parent_rect.size.y * (0.0 - data.anchor[1]) + p_margin + parent_rect.position.y;
 			break;
 
@@ -1940,7 +1940,7 @@ void Control::set_offsets_preset(LayoutPreset p_preset, LayoutPresetMode p_resiz
 		case PRESET_RIGHT_WIDE:
 		case PRESET_BOTTOM_WIDE:
 		case PRESET_HCENTER_WIDE:
-		case PRESET_WIDE:
+		case PRESET_FULL_RECT:
 			data.offset[2] = x * (1.0 - data.anchor[2]) - p_margin + parent_rect.position.x;
 			break;
 	}
@@ -1968,7 +1968,7 @@ void Control::set_offsets_preset(LayoutPreset p_preset, LayoutPresetMode p_resiz
 		case PRESET_RIGHT_WIDE:
 		case PRESET_BOTTOM_WIDE:
 		case PRESET_VCENTER_WIDE:
-		case PRESET_WIDE:
+		case PRESET_FULL_RECT:
 			data.offset[3] = parent_rect.size.y * (1.0 - data.anchor[3]) - p_margin + parent_rect.position.y;
 			break;
 	}
@@ -2003,7 +2003,7 @@ void Control::set_grow_direction_preset(LayoutPreset p_preset) {
 		case PRESET_BOTTOM_WIDE:
 		case PRESET_VCENTER_WIDE:
 		case PRESET_HCENTER_WIDE:
-		case PRESET_WIDE:
+		case PRESET_FULL_RECT:
 			set_h_grow_direction(GrowDirection::GROW_DIRECTION_BOTH);
 			break;
 	}
@@ -2031,7 +2031,7 @@ void Control::set_grow_direction_preset(LayoutPreset p_preset) {
 		case PRESET_RIGHT_WIDE:
 		case PRESET_VCENTER_WIDE:
 		case PRESET_HCENTER_WIDE:
-		case PRESET_WIDE:
+		case PRESET_FULL_RECT:
 			set_v_grow_direction(GrowDirection::GROW_DIRECTION_BOTH);
 			break;
 	}
@@ -3408,7 +3408,7 @@ void Control::_bind_methods() {
 	BIND_ENUM_CONSTANT(PRESET_BOTTOM_WIDE);
 	BIND_ENUM_CONSTANT(PRESET_VCENTER_WIDE);
 	BIND_ENUM_CONSTANT(PRESET_HCENTER_WIDE);
-	BIND_ENUM_CONSTANT(PRESET_WIDE);
+	BIND_ENUM_CONSTANT(PRESET_FULL_RECT);
 
 	BIND_ENUM_CONSTANT(PRESET_MODE_MINSIZE);
 	BIND_ENUM_CONSTANT(PRESET_MODE_KEEP_WIDTH);

+ 1 - 1
scene/gui/control.h

@@ -116,7 +116,7 @@ public:
 		PRESET_BOTTOM_WIDE,
 		PRESET_VCENTER_WIDE,
 		PRESET_HCENTER_WIDE,
-		PRESET_WIDE
+		PRESET_FULL_RECT
 	};
 
 	enum LayoutPresetMode {

+ 1 - 1
scene/gui/file_dialog.cpp

@@ -1060,7 +1060,7 @@ FileDialog::FileDialog() {
 
 	message = memnew(Label);
 	message->hide();
-	message->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	message->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
 	message->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
 	tree->add_child(message);

+ 1 - 1
scene/gui/graph_edit.cpp

@@ -2376,7 +2376,7 @@ GraphEdit::GraphEdit() {
 	top_layer = memnew(GraphEditFilter(this));
 	add_child(top_layer, false, INTERNAL_MODE_BACK);
 	top_layer->set_mouse_filter(MOUSE_FILTER_PASS);
-	top_layer->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	top_layer->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	top_layer->connect("draw", callable_mp(this, &GraphEdit::_top_layer_draw));
 	top_layer->connect("gui_input", callable_mp(this, &GraphEdit::_top_layer_input));
 	top_layer->connect("focus_exited", callable_mp(panner.ptr(), &ViewPanner::release_pan_key));

+ 2 - 2
scene/gui/popup_menu.cpp

@@ -1909,7 +1909,7 @@ void PopupMenu::popup(const Rect2 &p_bounds) {
 PopupMenu::PopupMenu() {
 	// Margin Container
 	margin_container = memnew(MarginContainer);
-	margin_container->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	margin_container->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	add_child(margin_container, false, INTERNAL_MODE_FRONT);
 	margin_container->connect("draw", callable_mp(this, &PopupMenu::_draw_background));
 
@@ -1921,7 +1921,7 @@ PopupMenu::PopupMenu() {
 	// The control which will display the items
 	control = memnew(Control);
 	control->set_clip_contents(false);
-	control->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	control->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	control->set_h_size_flags(Control::SIZE_EXPAND_FILL);
 	control->set_v_size_flags(Control::SIZE_EXPAND_FILL);
 	scroll_container->add_child(control, false, INTERNAL_MODE_FRONT);

+ 1 - 1
scene/gui/spin_box.cpp

@@ -319,7 +319,7 @@ SpinBox::SpinBox() {
 	line_edit = memnew(LineEdit);
 	add_child(line_edit, false, INTERNAL_MODE_FRONT);
 
-	line_edit->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	line_edit->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 	line_edit->set_mouse_filter(MOUSE_FILTER_PASS);
 	line_edit->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_LEFT);
 

+ 1 - 1
scene/gui/tab_container.cpp

@@ -233,7 +233,7 @@ void TabContainer::_repaint() {
 
 		if (i == current) {
 			c->show();
-			c->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+			c->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 
 			if (tabs_visible) {
 				c->set_offset(SIDE_TOP, _get_top_margin());

+ 1 - 1
scene/gui/tree.cpp

@@ -5018,7 +5018,7 @@ Tree::Tree() {
 	popup_editor_vb = memnew(VBoxContainer);
 	popup_editor->add_child(popup_editor_vb);
 	popup_editor_vb->add_theme_constant_override("separation", 0);
-	popup_editor_vb->set_anchors_and_offsets_preset(PRESET_WIDE);
+	popup_editor_vb->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
 	text_editor = memnew(LineEdit);
 	popup_editor_vb->add_child(text_editor);
 	text_editor->set_v_size_flags(SIZE_EXPAND_FILL);

+ 1 - 1
scene/main/viewport.cpp

@@ -1215,7 +1215,7 @@ void Viewport::_gui_show_tooltip() {
 		panel->connect("mouse_entered", callable_mp(this, &Viewport::_gui_cancel_tooltip));
 	}
 
-	base_tooltip->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
+	base_tooltip->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
 
 	panel->set_transient(true);
 	panel->set_flag(Window::FLAG_NO_FOCUS, true);