diff options
author | Yuri Sizov <yuris@humnom.net> | 2023-01-26 17:11:37 +0100 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-01-26 17:11:37 +0100 |
commit | 9b7124b49c93f24f35ecdf0f949582d0aa618daf (patch) | |
tree | d5c0ea5306745f7a8966555b839c0ca2398ea443 /scene/resources | |
parent | cc7aa72f01fdea5f93b0a618fcd12db55617beb0 (diff) |
Remove size restrictions from StyleBoxTexture
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/style_box.cpp | 16 | ||||
-rw-r--r-- | scene/resources/style_box.h | 2 |
2 files changed, 0 insertions, 18 deletions
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index 4f16986392..0beb62185d 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -231,22 +231,6 @@ bool StyleBoxTexture::is_draw_center_enabled() const { return draw_center; } -Size2 StyleBoxTexture::get_minimum_size() const { - Size2 min_size = StyleBox::get_minimum_size(); - - // Make sure that the min size is no smaller than the used texture region. - if (texture.is_valid()) { - if (min_size.x < region_rect.size.x) { - min_size.x = region_rect.size.x; - } - if (min_size.y < region_rect.size.y) { - min_size.y = region_rect.size.y; - } - } - - return min_size; -} - void StyleBoxTexture::set_expand_margin(Side p_side, float p_size) { ERR_FAIL_INDEX((int)p_side, 4); expand_margin[p_side] = p_size; diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h index 91033617ab..17acfd773e 100644 --- a/scene/resources/style_box.h +++ b/scene/resources/style_box.h @@ -107,8 +107,6 @@ protected: static void _bind_methods(); public: - virtual Size2 get_minimum_size() const override; - void set_expand_margin(Side p_expand_side, float p_size); void set_expand_margin_all(float p_expand_margin_size); void set_expand_margin_individual(float p_left, float p_top, float p_right, float p_bottom); |