fix: #1533
This commit is contained in:
1 parent
90985dffe9
commit
6333276c1b
1 file changed
+4
-2
@@ -59,7 +59,9 @@ public class Row : Panel
|
|||||||
if (cellCount > 0 && !child.IsFixed)
|
if (cellCount > 0 && !child.IsFixed)
|
||||||
{
|
{
|
||||||
totalCellCount += cellCount;
|
totalCellCount += cellCount;
|
||||||
child.Measure(new Size(cellCount * itemWidth - gutter, constraint.Height));
|
var availableWidth = Math.Max(0, cellCount * itemWidth - gutter);
|
||||||
|
|
||||||
|
child.Measure(new Size(availableWidth, constraint.Height));
|
||||||
_maxChildDesiredHeight = Math.Max(_maxChildDesiredHeight, child.DesiredSize.Height);
|
_maxChildDesiredHeight = Math.Max(_maxChildDesiredHeight, child.DesiredSize.Height);
|
||||||
|
|
||||||
if (totalCellCount > ColLayout.ColMaxCellCount)
|
if (totalCellCount > ColLayout.ColMaxCellCount)
|
||||||
@@ -94,7 +96,7 @@ public class Row : Panel
|
|||||||
var cellCount = child.GetLayoutCellCount(_layoutStatus);
|
var cellCount = child.GetLayoutCellCount(_layoutStatus);
|
||||||
totalCellCount += cellCount;
|
totalCellCount += cellCount;
|
||||||
|
|
||||||
var childWidth = (cellCount > 0 && !child.IsFixed) ? cellCount * itemWidth - gutter : child.DesiredSize.Width;
|
var childWidth = (cellCount > 0 && !child.IsFixed) ? Math.Max(0, cellCount * itemWidth - gutter) : child.DesiredSize.Width;
|
||||||
childBounds.Width = childWidth;
|
childBounds.Width = childWidth;
|
||||||
childBounds.X += child.Offset * itemWidth;
|
childBounds.X += child.Offset * itemWidth;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user