diff --git a/core/tree.go b/core/tree.go index 5b06a3f728..1a2b8cff47 100644 --- a/core/tree.go +++ b/core/tree.go @@ -592,6 +592,7 @@ func (tr *Tree) Position() { sz := &tr.Geom.Size sz.Actual.Total.X = rn.Geom.Size.Actual.Total.X - (tr.Geom.Pos.Total.X - rn.Geom.Pos.Total.X) sz.Actual.Content.X = sz.Actual.Total.X - sz.Space.X + sz.Alloc = sz.Actual tr.widgetSize.X = sz.Actual.Total.X tr.WidgetBase.Position() // just does our parts @@ -611,10 +612,12 @@ func (tr *Tree) ApplyScenePos() { sz := &tr.Geom.Size if sz.Actual.Total == tr.widgetSize { sz.setTotalFromContent(&sz.Actual) // restore after scrolling + sz.Alloc = sz.Actual } tr.WidgetBase.ApplyScenePos() tr.applyScenePosChildren() - tr.Geom.Size.Actual.Total = tr.widgetSize // key: we revert to just ourselves + sz.Actual.Total = tr.widgetSize // key: we revert to just ourselves + sz.Alloc = sz.Actual } func (tr *Tree) Render() {