mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Merge pull request #7650 from pkowal1982/fix_7011
Fix #7011 ScrollContainer takes into account child's EXPAND flag when scrolling is enabled
This commit is contained in:
@@ -236,14 +236,14 @@ void ScrollContainer::_notification(int p_what) {
|
||||
child_max_size.y = MAX(child_max_size.y, minsize.y);
|
||||
|
||||
Rect2 r = Rect2(-scroll,minsize);
|
||||
if (!(scroll_h || h_scroll->is_visible())) {
|
||||
if (!scroll_h || (!h_scroll->is_visible() && c->get_h_size_flags()&SIZE_EXPAND)) {
|
||||
r.pos.x=0;
|
||||
if (c->get_h_size_flags()&SIZE_EXPAND)
|
||||
r.size.width=MAX(size.width,minsize.width);
|
||||
else
|
||||
r.size.width=minsize.width;
|
||||
}
|
||||
if (!(scroll_v || v_scroll->is_visible())) {
|
||||
if (!scroll_v || (!v_scroll->is_visible() && c->get_v_size_flags()&SIZE_EXPAND)) {
|
||||
r.pos.y=0;
|
||||
r.size.height=size.height;
|
||||
if (c->get_v_size_flags()&SIZE_EXPAND)
|
||||
|
||||
Reference in New Issue
Block a user