1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

[Button] Use align_to_largest_stylebox for min. size calculation.

This commit is contained in:
bruvzg
2024-06-28 19:05:01 +02:00
parent 6a13fdcae3
commit 41df3caad3
2 changed files with 2 additions and 2 deletions

View File

@@ -530,7 +530,7 @@ Size2 Button::get_minimum_size_for_text_and_icon(const String &p_text, Ref<Textu
}
}
return _get_largest_stylebox_size() + minsize;
return (theme_cache.align_to_largest_stylebox ? _get_largest_stylebox_size() : _get_current_stylebox()->get_minimum_size()) + minsize;
}
void Button::_shape(Ref<TextParagraph> p_paragraph, String p_text) {