diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-09-09 09:07:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-09 09:07:53 +0200 |
commit | c909120b593753603c24217d2a5cbc1c85b51648 (patch) | |
tree | a34d35867189fd1d00d5fd6f145074a85510e955 /scene | |
parent | b4967e3b408230d5db56b9b98ae88ca2a9d90954 (diff) | |
parent | c4c9e4107346b581bd2a1b1aa9e4ecc56038be81 (diff) |
Merge pull request #64373 from YeldhamDev/edscale_likes_them_floaty
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/control.cpp | 6 | ||||
-rw-r--r-- | scene/gui/control.h | 6 | ||||
-rw-r--r-- | scene/gui/item_list.cpp | 6 | ||||
-rw-r--r-- | scene/gui/item_list.h | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index b4e603d5ed..347fe9aa11 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 3fb1494d66..38cafd835a 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 5db4d8306f..008109da65 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 486c609034..4b1b9d9282 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; |