summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-01-16 07:53:02 +0100
committerGitHub <noreply@github.com>2020-01-16 07:53:02 +0100
commit2e66de0da9a59adaeb7a9c118a2110429a94cd94 (patch)
tree8b7db71c841191aba9213c11e50d75b4117a73f0
parentb43101aae1718b5733a08fe7f626699465d8ae5c (diff)
parent574918f3446bd17174b4efb5f021eeeb5dcd622a (diff)
Merge pull request #35180 from timothyqiu/scroll-container-min-size
Updates ScrollContainer min size when toggle scrollbars
-rw-r--r--scene/gui/scroll_container.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index 05645d0263..e8f6fee27a 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -452,8 +452,12 @@ void ScrollContainer::_scroll_moved(float) {
};
void ScrollContainer::set_enable_h_scroll(bool p_enable) {
+ if (scroll_h == p_enable) {
+ return;
+ }
scroll_h = p_enable;
+ minimum_size_changed();
queue_sort();
}
@@ -463,8 +467,12 @@ bool ScrollContainer::is_h_scroll_enabled() const {
}
void ScrollContainer::set_enable_v_scroll(bool p_enable) {
+ if (scroll_v == p_enable) {
+ return;
+ }
scroll_v = p_enable;
+ minimum_size_changed();
queue_sort();
}