소스 검색

Merge pull request #8916 from Popov72/fix-gui-scrollviewer-paddingbottom

Fix paddingBottom of children not taken into account in ScrollViewer
David Catuhe 5 년 전
부모
커밋
e2561ce825
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      gui/src/2D/controls/scrollViewers/scrollViewerWindow.ts

+ 2 - 2
gui/src/2D/controls/scrollViewers/scrollViewerWindow.ts

@@ -301,8 +301,8 @@ export class _ScrollViewerWindow extends Container {
                 child._offsetTop(this._currentMeasure.top - child._currentMeasure.top);
             }
 
-            maxWidth = Math.max(maxWidth, child._currentMeasure.left - this._currentMeasure.left + child._currentMeasure.width);
-            maxHeight = Math.max(maxHeight, child._currentMeasure.top - this._currentMeasure.top + child._currentMeasure.height);
+            maxWidth = Math.max(maxWidth, child._currentMeasure.left - this._currentMeasure.left + child._currentMeasure.width + child.paddingRightInPixels);
+            maxHeight = Math.max(maxHeight, child._currentMeasure.top - this._currentMeasure.top + child._currentMeasure.height + child.paddingBottomInPixels);
         }
 
         if (this._currentMeasure.width !== maxWidth) {