Update LineEdit to include read_only StyleBox in get_minimum_size()

Fixes #90522
This commit is contained in:
aaronp64 2024-04-29 14:43:16 -04:00
parent 89850d553e
commit 3337c160a4
1 changed files with 2 additions and 2 deletions

View File

@ -1805,7 +1805,6 @@ void LineEdit::clear_internal() {
}
Size2 LineEdit::get_minimum_size() const {
Ref<StyleBox> style = theme_cache.normal;
Ref<Font> font = theme_cache.font;
int font_size = theme_cache.font_size;
@ -1834,7 +1833,8 @@ Size2 LineEdit::get_minimum_size() const {
}
min_size.width += icon_max_width;
return style->get_minimum_size() + min_size;
Size2 style_min_size = theme_cache.normal->get_minimum_size().max(theme_cache.read_only->get_minimum_size());
return style_min_size + min_size;
}
void LineEdit::deselect() {