Reshape and update button on oversampling change.

This commit is contained in:
bruvzg 2024-08-14 10:42:59 +03:00
parent 06fbc8395b
commit cc48ce34e5
No known key found for this signature in database
GPG Key ID: 7960FCF39844EC38
1 changed files with 7 additions and 0 deletions

View File

@ -212,6 +212,13 @@ void Button::_notification(int p_what) {
} break; } break;
case NOTIFICATION_DRAW: { 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 RID ci = get_canvas_item();
const Size2 size = get_size(); const Size2 size = get_size();