Fixup.
This commit is contained in:
parent
92cb4d20a4
commit
e638a9dde4
12
README.md
12
README.md
|
@ -22,13 +22,6 @@ type Widget interface {
|
||||||
Layout(Context) Context
|
Layout(Context) Context
|
||||||
}
|
}
|
||||||
|
|
||||||
func LayoutWithContext(ctx Context, ws ...Widget) Context {
|
|
||||||
for _, w := range ws {
|
|
||||||
ctx = w.Layout(ctx)
|
|
||||||
}
|
|
||||||
return ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
type WidgetCombinator func(...Widget) Widget
|
type WidgetCombinator func(...Widget) Widget
|
||||||
|
|
||||||
type Enclosure interface {
|
type Enclosure interface {
|
||||||
|
@ -55,14 +48,13 @@ func (f Flex) Flexible(v float32) Widget {
|
||||||
}
|
}
|
||||||
|
|
||||||
...
|
...
|
||||||
ctx = giowrap.LayoutWithContext(ctx,
|
ctx = myFlex(
|
||||||
myFlex(
|
|
||||||
w1,
|
w1,
|
||||||
giowrap.Flexible(0.5),
|
giowrap.Flexible(0.5),
|
||||||
w2,
|
w2,
|
||||||
giowrap.Flexible(1),
|
giowrap.Flexible(1),
|
||||||
w3,
|
w3,
|
||||||
))
|
).Layout(ctx)
|
||||||
ctx.Draw()
|
ctx.Draw()
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user