Remove font height restriction from Button

This commit is contained in:
kobewi 2022-05-08 00:25:35 +02:00
parent 563690347a
commit 800d5567a1

View file

@ -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;
}