From e8759f218d0f49cd9f1d7baa13ed8c8f4f3b278b Mon Sep 17 00:00:00 2001 From: kleonc <9283098+kleonc@users.noreply.github.com> Date: Fri, 11 Jun 2021 13:39:51 +0200 Subject: [PATCH] TextureButton Update min size on any texture change (cherry picked from commit 6c3c269f244ab90b54563649f3918a70446a745c) --- scene/gui/texture_button.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp index 5ff95a41ec4..6b4cf358f44 100644 --- a/scene/gui/texture_button.cpp +++ b/scene/gui/texture_button.cpp @@ -281,11 +281,13 @@ void TextureButton::set_pressed_texture(const Ref &p_pressed) { pressed = p_pressed; update(); + minimum_size_changed(); } void TextureButton::set_hover_texture(const Ref &p_hover) { hover = p_hover; update(); + minimum_size_changed(); } void TextureButton::set_disabled_texture(const Ref &p_disabled) { @@ -296,6 +298,7 @@ void TextureButton::set_click_mask(const Ref &p_click_mask) { click_mask = p_click_mask; update(); + minimum_size_changed(); } Ref TextureButton::get_normal_texture() const {