You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 17:36:07 +00:00
fix ScrollContainer cannot scroll when scroll bar is hidden
This commit is contained in:
@@ -228,14 +228,14 @@ void ScrollContainer::_notification(int p_what) {
|
|||||||
child_max_size.y = MAX(child_max_size.y, minsize.y);
|
child_max_size.y = MAX(child_max_size.y, minsize.y);
|
||||||
|
|
||||||
Rect2 r = Rect2(-scroll,minsize);
|
Rect2 r = Rect2(-scroll,minsize);
|
||||||
if (!h_scroll->is_visible()) {
|
if (!(scroll_h || h_scroll->is_visible())) {
|
||||||
r.pos.x=0;
|
r.pos.x=0;
|
||||||
if (c->get_h_size_flags()&SIZE_EXPAND)
|
if (c->get_h_size_flags()&SIZE_EXPAND)
|
||||||
r.size.width=MAX(size.width,minsize.width);
|
r.size.width=MAX(size.width,minsize.width);
|
||||||
else
|
else
|
||||||
r.size.width=minsize.width;
|
r.size.width=minsize.width;
|
||||||
}
|
}
|
||||||
if (!v_scroll->is_visible()) {
|
if (!(scroll_v || v_scroll->is_visible())) {
|
||||||
r.pos.y=0;
|
r.pos.y=0;
|
||||||
r.size.height=size.height;
|
r.size.height=size.height;
|
||||||
if (c->get_v_size_flags()&SIZE_EXPAND)
|
if (c->get_v_size_flags()&SIZE_EXPAND)
|
||||||
|
|||||||
Reference in New Issue
Block a user