Browse Source

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

Fix paddingBottom of children not taken into account in ScrollViewer
David Catuhe 5 years ago
parent
commit
e2561ce825
1 changed files with 2 additions and 2 deletions
  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) {