Precise size calculation of ScrollContainer

This commit is contained in:
volzhs 2018-08-28 22:41:33 +09:00
parent a651dbfe7e
commit f3dfa1c8b9

View file

@ -368,8 +368,10 @@ void ScrollContainer::update_scrollbars() {
Ref<StyleBox> sb = get_stylebox("bg"); Ref<StyleBox> sb = get_stylebox("bg");
size -= sb->get_minimum_size(); size -= sb->get_minimum_size();
Size2 hmin = h_scroll->get_combined_minimum_size(); Size2 hmin;
Size2 vmin = v_scroll->get_combined_minimum_size(); Size2 vmin;
if (scroll_h) hmin = h_scroll->get_combined_minimum_size();
if (scroll_v) vmin = v_scroll->get_combined_minimum_size();
Size2 min = child_max_size; Size2 min = child_max_size;