1
0
Fork 0

Merge pull request #103728 from bruvzg/lbl_min_sz_ex_sp

[Label] Fix min. size calculation counting extra spacing twice.
This commit is contained in:
Rémi Verschelde 2025-03-19 12:26:51 +01:00
commit 22e41a2b5f
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -981,7 +981,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) {