Fixed bugs in Overflow control.
- Tries to take as much space as possible. - Draw buffer should be exactly size needed.
This commit is contained in:
parent
f31cd28771
commit
d14a9bd0e7
@ -86,6 +86,10 @@ func (o *overflow) Arrange(ctx Context, bounds geom.RectangleF32, offset geom.Po
|
||||
}
|
||||
}
|
||||
|
||||
func (o *overflow) DesiredSize(ctx Context) geom.PointF32 {
|
||||
return geom.PtF32(geom.NaN32(), geom.NaN32())
|
||||
}
|
||||
|
||||
func (o *overflow) Handle(ctx Context, e Event) {
|
||||
hor, ver := o.shouldScroll(o.bounds)
|
||||
if hor {
|
||||
@ -119,6 +123,7 @@ func (o *overflow) Render(ctx Context) {
|
||||
}
|
||||
|
||||
var content = o.Content.Bounds()
|
||||
content.Min = geom.ZeroPtF32
|
||||
if o.buffer == nil || o.buffer.Width() != content.Dx() || o.buffer.Height() != content.Dy() {
|
||||
if o.buffer != nil {
|
||||
o.buffer.Destroy()
|
||||
|
Loading…
Reference in New Issue
Block a user