1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-07 19:53:17 +00:00

Reshape and update button on oversampling change.

This commit is contained in:
bruvzg
2024-08-14 10:42:59 +03:00
parent db66bd35af
commit 41a1a7f94b

View File

@@ -210,6 +210,13 @@ void Button::_notification(int p_what) {
} break;
case NOTIFICATION_DRAW: {
// Reshape and update size min. if text is invalidated by an external source (e.g., oversampling).
if (text_buf.is_valid() && !TS->shaped_text_is_ready(text_buf->get_rid())) {
_shape();
update_minimum_size();
}
const RID ci = get_canvas_item();
const Size2 size = get_size();