Remove unused function from cmd/cal/main.go.

This commit is contained in:
Greg 2019-08-22 10:48:14 -04:00
parent 3724f62497
commit 25847d5921
2 changed files with 1 additions and 19 deletions

View File

@ -82,24 +82,6 @@ func (w *SLabel) Layout(ctx *gio.Context) {
}
}
func Rows(n int) gio.WidgetCombinator {
f1 := gio.NewFlex(gio.Axis(layout.Vertical))
f2 := gio.NewFlex(gio.Axis(layout.Horizontal),
gio.MainAxisAlignment(layout.SpaceAround))
return func(ws ...gio.Widget) gio.Widget {
cs := make([]gio.Widget, (len(ws)+n-1) / n)
for c := 0; c < len(cs); c++ {
end := (c + 1) * n
if end > len(ws) {
end = len(ws)
}
cs[c] = f2(ws[c*n:end]...)
}
return f1(cs...)
}
}
func NewCal(sm *SelectableMonth) gio.Widget {
pad := gio.NewLabel("", gio.Face(face), gio.Align(text.End))
ds := make([]gio.Widget,42)

View File

@ -510,7 +510,7 @@ func NewGrid(cols int) WidgetCombinator {
for _,w := range ws {
g.Begin()
w.Layout(ctx)
ctx.cs = cs
ctx.cs = cs // widget layout can modify constraints...
gcs = append(gcs,g.End(ctx.dims))
}
ctx.dims = g.Layout(gcs...)