Skip to content

Commit

Permalink
Reshape and update button on oversampling change.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruvzg committed Oct 6, 2024
1 parent db66bd3 commit 41a1a7f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scene/gui/button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 41a1a7f

Please sign in to comment.