diff options
Diffstat (limited to 'editor')
35 files changed, 77 insertions, 77 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index 698390a61e..8c59d65c80 100644 --- a/editor/action_map_editor.cpp +++ b/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); diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index 391cd009f1..44e04efb5d 100644 --- a/editor/animation_bezier_editor.cpp +++ b/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); diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index c5fd393746..703cfaee3d 100644 --- a/editor/animation_track_editor.cpp +++ b/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); diff --git a/editor/debugger/editor_performance_profiler.cpp b/editor/debugger/editor_performance_profiler.cpp index 50eef7b8b8..55d025f675 100644 --- a/editor/debugger/editor_performance_profiler.cpp +++ b/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++) { diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index d9cdefbca7..166dcf19c8 100644 --- a/editor/editor_node.cpp +++ b/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); diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp index 6453db3b0b..dc77b5fea9 100644 --- a/editor/editor_path.cpp +++ b/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); diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index 2e78b58e11..40e16bf717 100644 --- a/editor/editor_resource_picker.cpp +++ b/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); diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index c651d6bf6e..5c0ccd11f0 100644 --- a/editor/editor_spin_slider.cpp +++ b/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)); diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp index bca8c95574..f1d08783ad 100644 --- a/editor/groups_editor.cpp +++ b/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")); diff --git a/editor/icons/ControlAlignWide.svg b/editor/icons/ControlAlignFullRect.svg index 0099e04896..0099e04896 100644 --- a/editor/icons/ControlAlignWide.svg +++ b/editor/icons/ControlAlignFullRect.svg diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 05d7a5f973..1258b9a03c 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/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)); diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index bc95624dd5..537928ca21 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/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(); } diff --git a/editor/plugins/audio_stream_editor_plugin.cpp b/editor/plugins/audio_stream_editor_plugin.cpp index a60e49ca9d..9b874ada45 100644 --- a/editor/plugins/audio_stream_editor_plugin.cpp +++ b/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); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 9723fece5e..10f4b4fe24 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/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(); } diff --git a/editor/plugins/control_editor_plugin.cpp b/editor/plugins/control_editor_plugin.cpp index 3adaf8f601..4d77f71be9 100644 --- a/editor/plugins/control_editor_plugin.cpp +++ b/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"))); diff --git a/editor/plugins/control_editor_plugin.h b/editor/plugins/control_editor_plugin.h index 96451f7dcf..d3f1d3acbb 100644 --- a/editor/plugins/control_editor_plugin.h +++ b/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, diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp index eb004568d0..34db75f118 100644 --- a/editor/plugins/material_editor_plugin.cpp +++ b/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); diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp index 7029768479..b23395fea2 100644 --- a/editor/plugins/mesh_editor_plugin.cpp +++ b/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(); diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 7530f88fef..3042db7e2d 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/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(); } diff --git a/editor/plugins/replication_editor_plugin.cpp b/editor/plugins/replication_editor_plugin.cpp index 9e495c3aa3..3e06a6739f 100644 --- a/editor/plugins/replication_editor_plugin.cpp +++ b/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); } diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 66cd85a26a..3ba8343268 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/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); diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index d79d2e9012..5f6c805173 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/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); diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp index 1281ce0cfd..d4baff34e2 100644 --- a/editor/plugins/style_box_editor_plugin.cpp +++ b/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); diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp index 7ca65c073d..84caede081 100644 --- a/editor/plugins/text_editor.cpp +++ b/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(); diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp index 98e80c5513..f6b02d5f80 100644 --- a/editor/plugins/texture_editor_plugin.cpp +++ b/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); diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 129af1bb1d..c725966745 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/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); diff --git a/editor/plugins/theme_editor_preview.cpp b/editor/plugins/theme_editor_preview.cpp index 826631d750..0c7303dda4 100644 --- a/editor/plugins/theme_editor_preview.cpp +++ b/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); diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp index 3073c8a7f2..f119ada810 100644 --- a/editor/plugins/tiles/tile_atlas_view.cpp +++ b/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); diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp index 1263ee5758..a00e1ed9e8 100644 --- a/editor/plugins/tiles/tile_data_editors.cpp +++ b/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); diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp index deffa48615..20e548acba 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp +++ b/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); diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp index ed13afc235..1c9afa8be8 100644 --- a/editor/progress_dialog.cpp +++ b/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; diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index f7ef574205..a98578ad7d 100644 --- a/editor/project_manager.cpp +++ b/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); diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 277ae14e0e..0693294316 100644 --- a/editor/property_editor.cpp +++ b/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); diff --git a/editor/scene_create_dialog.cpp b/editor/scene_create_dialog.cpp index 6a35b22210..94a5c07709 100644 --- a/editor/scene_create_dialog.cpp +++ b/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: diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index fb8be5db81..be37d50a2e 100644 --- a/editor/scene_tree_dock.cpp +++ b/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; |