grid.Margin() works
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
595f4c6eb3
commit
c22d0f4866
25
main.go
25
main.go
|
@ -49,8 +49,8 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri
|
|||
log.Warn("status window doesn't exist")
|
||||
return
|
||||
}
|
||||
log.Warn("status window exists. trying Update() here")
|
||||
newRepo.status.Toggle()
|
||||
log.Warn("status window exists. trying Show() here")
|
||||
newRepo.status.Show()
|
||||
})
|
||||
grid.NewButton("TestDraw()", func () {
|
||||
if newRepo.status == nil {
|
||||
|
@ -65,9 +65,6 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri
|
|||
newRepo.pButton.Hide()
|
||||
}
|
||||
newRepo.status = repostatus.New(myGui, newRepo.path)
|
||||
newRepo.status.Horizontal()
|
||||
newRepo.status.Make()
|
||||
newRepo.status.Make2()
|
||||
newRepo.status.SetMasterName(master)
|
||||
newRepo.status.SetDevelName(devel)
|
||||
newRepo.status.SetUserName(user)
|
||||
|
@ -84,6 +81,7 @@ func repoworld() {
|
|||
// box2 := win.Box().NewBox("bw vbox", false)
|
||||
group := box.NewGroup("go repositories (read from ~/.config/myrepolist)")
|
||||
grid := group.NewGrid("test", 11, 1)
|
||||
grid.Margin()
|
||||
|
||||
grid.NewLabel("")
|
||||
grid.NewLabel("branch")
|
||||
|
@ -109,5 +107,22 @@ func repoworld() {
|
|||
addRepo(grid, path, mbranch, dbranch, ubranch)
|
||||
}
|
||||
|
||||
box2 := win.Box().NewBox("bw vbox", false)
|
||||
box2.NewButton("grid.Pad()", func () {
|
||||
grid.Margin()
|
||||
})
|
||||
|
||||
box2.NewButton("status.Update() all", func () {
|
||||
for _, repo := range allrepos {
|
||||
repo.status.Update()
|
||||
}
|
||||
})
|
||||
|
||||
box2.NewButton("rescan all", func () {
|
||||
for _, repo := range allrepos {
|
||||
repo.newScan()
|
||||
}
|
||||
})
|
||||
|
||||
win.Draw()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue