1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #64218 from Rindbee/fix-button-minimum-size-calculation

This commit is contained in:
Rémi Verschelde
2022-08-22 22:40:59 +02:00
committed by GitHub
9 changed files with 12 additions and 14 deletions

View File

@@ -47,7 +47,7 @@ Size2 OptionButton::get_minimum_size() const {
const Size2 arrow_size = Control::get_theme_icon(SNAME("arrow"))->get_size();
Size2 content_size = minsize - padding;
content_size.width += arrow_size.width + get_theme_constant(SNAME("h_separation"));
content_size.width += arrow_size.width + MAX(0, get_theme_constant(SNAME("h_separation")));
content_size.height = MAX(content_size.height, arrow_size.height);
minsize = content_size + padding;