diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 71798d25740..7b9bf0fa37b 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -972,7 +972,7 @@
Enables whether rendering of [CanvasItem] based children should be clipped to this control's rectangle. If [code]true[/code], parts of a child which would be visibly outside of this control's rectangle will not be rendered and won't receive input.
-
+
The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes.
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index 55d794ae597..844f260971e 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -349,7 +349,7 @@
The width all columns will be adjusted to.
A value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width.
-
+
The size all icons will be adjusted to.
If either X or Y component is not greater than zero, icon size won't be affected.
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 7bbdc16c61d..f001887ef94 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -1602,7 +1602,7 @@ void EditorInspectorArray::_rmb_popup_id_pressed(int p_id) {
case OPTION_RESIZE_ARRAY:
new_size_spin_box->set_value(count);
resize_dialog->get_ok_button()->set_disabled(true);
- resize_dialog->popup_centered(Size2i(250, 0) * EDSCALE);
+ resize_dialog->popup_centered(Size2(250, 0) * EDSCALE);
new_size_spin_box->get_line_edit()->grab_focus();
new_size_spin_box->get_line_edit()->select_all();
break;
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index b9f30158375..6c3ce20d7a5 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -8148,7 +8148,7 @@ Node3DEditor::Node3DEditor() {
CenterContainer *sun_direction_center = memnew(CenterContainer);
sun_direction = memnew(Control);
- sun_direction->set_custom_minimum_size(Size2i(128, 128) * EDSCALE);
+ sun_direction->set_custom_minimum_size(Size2(128, 128) * EDSCALE);
sun_direction_center->add_child(sun_direction);
sun_vb->add_margin_child(TTR("Sun Direction"), sun_direction_center);
sun_direction->connect("gui_input", callable_mp(this, &Node3DEditor::_sun_direction_input));
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index f6acd8ceda1..1fb9b424496 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -1186,7 +1186,7 @@ ThemeItemImportTree::ThemeItemImportTree() {
void ThemeItemEditorDialog::ok_pressed() {
if (import_default_theme_items->has_selected_items() || import_editor_theme_items->has_selected_items() || import_other_theme_items->has_selected_items()) {
confirm_closing_dialog->set_text(TTR("Import Items tab has some items selected. Selection will be lost upon closing this window.\nClose anyway?"));
- confirm_closing_dialog->popup_centered(Size2i(380, 120) * EDSCALE);
+ confirm_closing_dialog->popup_centered(Size2(380, 120) * EDSCALE);
return;
}
diff --git a/editor/plugins/tiles/atlas_merging_dialog.cpp b/editor/plugins/tiles/atlas_merging_dialog.cpp
index de4f3f79895..d7e08db9540 100644
--- a/editor/plugins/tiles/atlas_merging_dialog.cpp
+++ b/editor/plugins/tiles/atlas_merging_dialog.cpp
@@ -269,7 +269,7 @@ AtlasMergingDialog::AtlasMergingDialog() {
// Atlas sources item list.
atlas_merging_atlases_list = memnew(ItemList);
- atlas_merging_atlases_list->set_fixed_icon_size(Size2i(60, 60) * EDSCALE);
+ atlas_merging_atlases_list->set_fixed_icon_size(Size2(60, 60) * EDSCALE);
atlas_merging_atlases_list->set_h_size_flags(Control::SIZE_EXPAND_FILL);
atlas_merging_atlases_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
atlas_merging_atlases_list->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST);
diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp
index 01bef9b52bf..a91f22ccd04 100644
--- a/editor/plugins/tiles/tile_map_editor.cpp
+++ b/editor/plugins/tiles/tile_map_editor.cpp
@@ -2170,7 +2170,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() {
split_container_left_side->set_h_size_flags(Control::SIZE_EXPAND_FILL);
split_container_left_side->set_v_size_flags(Control::SIZE_EXPAND_FILL);
split_container_left_side->set_stretch_ratio(0.25);
- split_container_left_side->set_custom_minimum_size(Size2i(70, 0) * EDSCALE);
+ split_container_left_side->set_custom_minimum_size(Size2(70, 0) * EDSCALE);
atlas_sources_split_container->add_child(split_container_left_side);
HBoxContainer *sources_bottom_actions = memnew(HBoxContainer);
@@ -2190,11 +2190,11 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() {
sources_bottom_actions->add_child(source_sort_button);
sources_list = memnew(ItemList);
- sources_list->set_fixed_icon_size(Size2i(60, 60) * EDSCALE);
+ sources_list->set_fixed_icon_size(Size2(60, 60) * EDSCALE);
sources_list->set_h_size_flags(Control::SIZE_EXPAND_FILL);
sources_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
sources_list->set_stretch_ratio(0.25);
- sources_list->set_custom_minimum_size(Size2i(70, 0) * EDSCALE);
+ sources_list->set_custom_minimum_size(Size2(70, 0) * EDSCALE);
sources_list->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST);
sources_list->connect("item_selected", callable_mp(this, &TileMapEditorTilesPlugin::_update_fix_selected_and_hovered).unbind(1));
sources_list->connect("item_selected", callable_mp(this, &TileMapEditorTilesPlugin::_update_source_display).unbind(1));
@@ -3323,7 +3323,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() {
terrains_tree = memnew(Tree);
terrains_tree->set_h_size_flags(Control::SIZE_EXPAND_FILL);
terrains_tree->set_stretch_ratio(0.25);
- terrains_tree->set_custom_minimum_size(Size2i(70, 0) * EDSCALE);
+ terrains_tree->set_custom_minimum_size(Size2(70, 0) * EDSCALE);
terrains_tree->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST);
terrains_tree->set_hide_root(true);
terrains_tree->connect("item_selected", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_tiles_list));
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
index 2aea020902d..228e475083a 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
@@ -2342,7 +2342,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
// Middle panel.
ScrollContainer *middle_panel = memnew(ScrollContainer);
middle_panel->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
- middle_panel->set_custom_minimum_size(Size2i(200, 0) * EDSCALE);
+ middle_panel->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
split_container_right_side->add_child(middle_panel);
VBoxContainer *middle_vbox_container = memnew(VBoxContainer);
diff --git a/editor/plugins/tiles/tile_set_editor.cpp b/editor/plugins/tiles/tile_set_editor.cpp
index dca17475e0f..80a8318bbb4 100644
--- a/editor/plugins/tiles/tile_set_editor.cpp
+++ b/editor/plugins/tiles/tile_set_editor.cpp
@@ -690,7 +690,7 @@ TileSetEditor::TileSetEditor() {
split_container_left_side->set_h_size_flags(SIZE_EXPAND_FILL);
split_container_left_side->set_v_size_flags(SIZE_EXPAND_FILL);
split_container_left_side->set_stretch_ratio(0.25);
- split_container_left_side->set_custom_minimum_size(Size2i(70, 0) * EDSCALE);
+ split_container_left_side->set_custom_minimum_size(Size2(70, 0) * EDSCALE);
split_container->add_child(split_container_left_side);
source_sort_button = memnew(MenuButton);
@@ -706,7 +706,7 @@ TileSetEditor::TileSetEditor() {
p->set_item_checked(TilesEditorPlugin::SOURCE_SORT_ID, true);
sources_list = memnew(ItemList);
- sources_list->set_fixed_icon_size(Size2i(60, 60) * EDSCALE);
+ sources_list->set_fixed_icon_size(Size2(60, 60) * EDSCALE);
sources_list->set_h_size_flags(SIZE_EXPAND_FILL);
sources_list->set_v_size_flags(SIZE_EXPAND_FILL);
sources_list->connect("item_selected", callable_mp(this, &TileSetEditor::_source_selected));
diff --git a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
index 9a4b14616f8..f7622e68ab2 100644
--- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
@@ -463,7 +463,7 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
// Middle panel.
ScrollContainer *middle_panel = memnew(ScrollContainer);
middle_panel->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
- middle_panel->set_custom_minimum_size(Size2i(200, 0) * EDSCALE);
+ middle_panel->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
split_container_right_side->add_child(middle_panel);
VBoxContainer *middle_vbox_container = memnew(VBoxContainer);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 27c34ab72ee..2af8da02a34 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -5693,7 +5693,7 @@ VisualShaderEditor::VisualShaderEditor() {
graph_plugin->set_editor(this);
property_editor_popup = memnew(PopupPanel);
- property_editor_popup->set_min_size(Size2i(180, 0) * EDSCALE);
+ property_editor_popup->set_min_size(Size2(180, 0) * EDSCALE);
add_child(property_editor_popup);
edited_property_holder.instantiate();
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 544e8c93232..270e04050e8 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -141,7 +141,7 @@ private:
install_status_rect->set_texture(new_icon);
}
- set_size(Size2i(500, 0) * EDSCALE);
+ set_size(Size2(500, 0) * EDSCALE);
}
String _test_path() {
@@ -761,7 +761,7 @@ public:
_test_path();
}
- popup_centered(Size2i(500, 0) * EDSCALE);
+ popup_centered(Size2(500, 0) * EDSCALE);
}
ProjectDialog() {
diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs b/modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs
index 4041026426a..237ac85267f 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs
@@ -122,7 +122,7 @@ namespace GodotTools.Build
{
base._Ready();
- CustomMinimumSize = new Vector2(0, 228) * EditorScale;
+ CustomMinimumSize = new Vector2i(0, (int)(228 * EditorScale));
SizeFlagsVertical = (int)SizeFlags.ExpandFill;
var toolBarHBox = new HBoxContainer { SizeFlagsHorizontal = (int)SizeFlags.ExpandFill };
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index b4e603d5edc..347fe9aa11e 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -1564,7 +1564,7 @@ Size2 Control::get_minimum_size() const {
return Vector2();
}
-void Control::set_custom_minimum_size(const Size2 &p_custom) {
+void Control::set_custom_minimum_size(const Size2i &p_custom) {
if (p_custom == data.custom_minimum_size) {
return;
}
@@ -1572,7 +1572,7 @@ void Control::set_custom_minimum_size(const Size2 &p_custom) {
update_minimum_size();
}
-Size2 Control::get_custom_minimum_size() const {
+Size2i Control::get_custom_minimum_size() const {
return data.custom_minimum_size;
}
@@ -3132,7 +3132,7 @@ void Control::_bind_methods() {
ADD_GROUP("Layout", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "clip_contents"), "set_clip_contents", "is_clipping_contents");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "custom_minimum_size", PROPERTY_HINT_NONE, "suffix:px"), "set_custom_minimum_size", "get_custom_minimum_size");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "custom_minimum_size", PROPERTY_HINT_NONE, "suffix:px"), "set_custom_minimum_size", "get_custom_minimum_size");
ADD_PROPERTY(PropertyInfo(Variant::INT, "layout_direction", PROPERTY_HINT_ENUM, "Inherited,Locale,Left-to-Right,Right-to-Left"), "set_layout_direction", "get_layout_direction");
ADD_PROPERTY(PropertyInfo(Variant::INT, "layout_mode", PROPERTY_HINT_ENUM, "Position,Anchors,Container,Uncontrolled", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "_set_layout_mode", "_get_layout_mode");
ADD_PROPERTY_DEFAULT("layout_mode", LayoutMode::LAYOUT_MODE_POSITION);
diff --git a/scene/gui/control.h b/scene/gui/control.h
index 3fb1494d661..38cafd835a2 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -200,7 +200,7 @@ private:
int h_size_flags = SIZE_FILL;
int v_size_flags = SIZE_FILL;
real_t expand = 1.0;
- Point2 custom_minimum_size;
+ Point2i custom_minimum_size;
// Input events and rendering.
@@ -460,8 +460,8 @@ public:
virtual Size2 get_minimum_size() const;
virtual Size2 get_combined_minimum_size() const;
- void set_custom_minimum_size(const Size2 &p_custom);
- Size2 get_custom_minimum_size() const;
+ void set_custom_minimum_size(const Size2i &p_custom);
+ Size2i get_custom_minimum_size() const;
// Container sizing.
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 5db4d8306f9..008109da65b 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -596,7 +596,7 @@ ItemList::IconMode ItemList::get_icon_mode() const {
return icon_mode;
}
-void ItemList::set_fixed_icon_size(const Size2 &p_size) {
+void ItemList::set_fixed_icon_size(const Size2i &p_size) {
if (fixed_icon_size == p_size) {
return;
}
@@ -605,7 +605,7 @@ void ItemList::set_fixed_icon_size(const Size2 &p_size) {
queue_redraw();
}
-Size2 ItemList::get_fixed_icon_size() const {
+Size2i ItemList::get_fixed_icon_size() const {
return fixed_icon_size;
}
@@ -1830,7 +1830,7 @@ void ItemList::_bind_methods() {
ADD_GROUP("Icon", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "icon_mode", PROPERTY_HINT_ENUM, "Top,Left"), "set_icon_mode", "get_icon_mode");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "icon_scale"), "set_icon_scale", "get_icon_scale");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "fixed_icon_size", PROPERTY_HINT_NONE, "suffix:px"), "set_fixed_icon_size", "get_fixed_icon_size");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "fixed_icon_size", PROPERTY_HINT_NONE, "suffix:px"), "set_fixed_icon_size", "get_fixed_icon_size");
BIND_ENUM_CONSTANT(ICON_MODE_TOP);
BIND_ENUM_CONSTANT(ICON_MODE_LEFT);
diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h
index 486c6090341..4b1b9d9282f 100644
--- a/scene/gui/item_list.h
+++ b/scene/gui/item_list.h
@@ -244,8 +244,8 @@ public:
void set_icon_mode(IconMode p_mode);
IconMode get_icon_mode() const;
- void set_fixed_icon_size(const Size2 &p_size);
- Size2 get_fixed_icon_size() const;
+ void set_fixed_icon_size(const Size2i &p_size);
+ Size2i get_fixed_icon_size() const;
void set_allow_rmb_select(bool p_allow);
bool get_allow_rmb_select() const;