summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-06-15 15:01:16 +0200
committerGitHub <noreply@github.com>2021-06-15 15:01:16 +0200
commit7efde449b2556cb16f93d0e8c66e94942700530e (patch)
tree6224059d639ae29aafc47b188f9590fc942a9015 /scene
parent3942ea68a8e54d06795389ec87545b14dd84a93f (diff)
parent6c3c269f244ab90b54563649f3918a70446a745c (diff)
Merge pull request #49508 from kleonc/texture_button-updating-min_size
TextureButton Update min size on any texture change
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/texture_button.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp
index f43e3d1a9d..8659ea06a2 100644
--- a/scene/gui/texture_button.cpp
+++ b/scene/gui/texture_button.cpp
@@ -295,11 +295,13 @@ void TextureButton::set_normal_texture(const Ref<Texture2D> &p_normal) {
void TextureButton::set_pressed_texture(const Ref<Texture2D> &p_pressed) {
pressed = p_pressed;
update();
+ minimum_size_changed();
}
void TextureButton::set_hover_texture(const Ref<Texture2D> &p_hover) {
hover = p_hover;
update();
+ minimum_size_changed();
}
void TextureButton::set_disabled_texture(const Ref<Texture2D> &p_disabled) {
@@ -310,6 +312,7 @@ void TextureButton::set_disabled_texture(const Ref<Texture2D> &p_disabled) {
void TextureButton::set_click_mask(const Ref<BitMap> &p_click_mask) {
click_mask = p_click_mask;
update();
+ minimum_size_changed();
}
Ref<Texture2D> TextureButton::get_normal_texture() const {