Stack through StickyHeader, with behavior tests and gallery demos. kit gains Arrive, Settle (paint-time layout check) and Shade. Several actions return named ui.Element results; mygo vet forbids elements in structs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
14 lines
370 B
Go
14 lines
370 B
Go
package layout
|
|
|
|
import (
|
|
"git.zacharyzhang.com/ZacharyZhang-NY/CrychicUI/kit"
|
|
"github.com/egoist/mygo/ui"
|
|
)
|
|
|
|
// Centered centers content in its room; the content scales in.
|
|
func Centered(c *ui.Context, content func()) ui.Element {
|
|
return ui.Column(c).Fill().Center().Children(func() {
|
|
kit.Arrive(ui.Box(c), ui.Pose{Scale: 0.96, Fade: 1}, 0).Children(content)
|
|
})
|
|
}
|