瀏覽代碼

Use VScrollBar when calculating horiz. offset in ScrollContainer

Someone forgot to change `h_scroll` to `v_scroll` when copy-pasting the code ;)
pshe94 6 年之前
父節點
當前提交
554b3f77c7
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/scroll_container.cpp

+ 1 - 1
scene/gui/scroll_container.cpp

@@ -246,7 +246,7 @@ void ScrollContainer::_notification(int p_what) {
 			size.y -= h_scroll->get_minimum_size().y;
 			size.y -= h_scroll->get_minimum_size().y;
 
 
 		if (v_scroll->is_visible_in_tree() && v_scroll->get_parent() == this) //scrolls may have been moved out for reasons
 		if (v_scroll->is_visible_in_tree() && v_scroll->get_parent() == this) //scrolls may have been moved out for reasons
-			size.x -= h_scroll->get_minimum_size().x;
+			size.x -= v_scroll->get_minimum_size().x;
 
 
 		for (int i = 0; i < get_child_count(); i++) {
 		for (int i = 0; i < get_child_count(); i++) {