mirror of
https://github.com/godotengine/godot.git
synced 2025-01-24 19:51:12 -05:00
Merge pull request #60867 from KoBeWi/μtext
Remove font height restriction from Button
This commit is contained in:
commit
3ad751f7e0
1 changed files with 5 additions and 5 deletions
|
@ -60,11 +60,11 @@ Size2 Button::get_minimum_size() const {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ref<Font> font = get_theme_font(SNAME("font"));
|
||||
float font_height = font->get_height(get_theme_font_size(SNAME("font_size")));
|
||||
|
||||
minsize.height = MAX(font_height, minsize.height);
|
||||
if (!xl_text.is_empty()) {
|
||||
Ref<Font> font = get_theme_font(SNAME("font"));
|
||||
float font_height = font->get_height(get_theme_font_size(SNAME("font_size")));
|
||||
minsize.height = MAX(font_height, minsize.height);
|
||||
}
|
||||
|
||||
return get_theme_stylebox(SNAME("normal"))->get_minimum_size() + minsize;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue