ソースを参照

take control's margin into account during Container total width/height calculation

Andrew Karpushin 12 年 前
コミット
96bbfaa984
1 ファイル変更2 行追加2 行削除
  1. 2 2
      gameplay/src/Container.cpp

+ 2 - 2
gameplay/src/Container.cpp

@@ -1312,13 +1312,13 @@ void Container::updateScroll()
         const Rectangle& bounds = control->getBounds();
         const Theme::Margin& margin = control->getMargin();
 
-        float newWidth = bounds.x + bounds.width;
+        float newWidth = bounds.x + bounds.width + margin.right;
         if (newWidth > _totalWidth)
         {
             _totalWidth = newWidth;
         }
 
-        float newHeight = bounds.y + bounds.height;
+        float newHeight = bounds.y + bounds.height + margin.bottom;
         if (newHeight > _totalHeight)
         {
             _totalHeight = newHeight;