forked from joejulian/gio
ui/layout: make Align a Direction
Removes the stutter by simplifying
layout.Align{Alignment: layout.NE}
to
layout.Align(layout.NE)
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -47,7 +47,7 @@ func ExampleAlign() {
|
||||
// Rigid constraints with both minimum and maximum set.
|
||||
ctx.Constraints = layout.RigidConstraints(image.Point{X: 100, Y: 100})
|
||||
|
||||
align := layout.Align{Alignment: layout.Center}
|
||||
align := layout.Align(layout.Center)
|
||||
align.Layout(ops, ctx, func() {
|
||||
// Lay out a 50x50 sized widget.
|
||||
layoutWidget(ctx, 50, 50)
|
||||
|
||||
Reference in New Issue
Block a user