Last visibile item in StackPanel is now clipped to maximum available area.
This commit is contained in:
parent
de8ce3e7bc
commit
12a9f5ee39
@ -42,7 +42,9 @@ func (p *StackPanel) Arrange(ctx Context, bounds geom.RectangleF32, offset geom.
|
||||
height = remainder / float32(stretch)
|
||||
}
|
||||
}
|
||||
var child = geom.RectF32(bounds.Min.X, bounds.Min.Y+childOffset, bounds.Max.X, bounds.Min.Y+childOffset+height)
|
||||
minY := geom.Min32(bounds.Max.Y, bounds.Min.Y+childOffset)
|
||||
maxY := geom.Min32(bounds.Max.Y, bounds.Min.Y+childOffset+height)
|
||||
var child = geom.RectF32(bounds.Min.X, minY, bounds.Max.X, maxY)
|
||||
p.Children[i].Arrange(ctx, p.Orientation.FlipRect(child), offset, p)
|
||||
childOffset += height
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user