mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
[Label] Fix min. size calculation counting extra spacing twice.
This commit is contained in:
parent
134da37497
commit
acdaaf48f9
1 changed files with 1 additions and 1 deletions
|
@ -961,7 +961,7 @@ Size2 Label::get_minimum_size() const {
|
|||
const Ref<Font> &font = (settings.is_valid() && settings->get_font().is_valid()) ? settings->get_font() : theme_cache.font;
|
||||
int font_size = settings.is_valid() ? settings->get_font_size() : theme_cache.font_size;
|
||||
|
||||
min_size.height = MAX(min_size.height, font->get_height(font_size) + font->get_spacing(TextServer::SPACING_TOP) + font->get_spacing(TextServer::SPACING_BOTTOM));
|
||||
min_size.height = MAX(min_size.height, font->get_height(font_size));
|
||||
|
||||
Size2 min_style = theme_cache.normal_style->get_minimum_size();
|
||||
if (autowrap_mode != TextServer::AUTOWRAP_OFF) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue