mirror of
https://github.com/godotengine/godot
synced 2024-09-06 02:48:29 +00:00
Merge pull request #91326 from aaronp64/line_edit_min_size
Update `LineEdit` to include `read_only` StyleBox in `get_minimum_size()`
This commit is contained in:
commit
472273f07a
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue