pad grid and group by default
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
a7640472cb
commit
ba2373fdf7
|
@ -52,11 +52,12 @@ func (n *Node) DebugFlags(makeWindow bool) {
|
||||||
if (makeWindow) {
|
if (makeWindow) {
|
||||||
w = me.rootNode.NewWindow("Debug Flags")
|
w = me.rootNode.NewWindow("Debug Flags")
|
||||||
w.Custom = w.StandardClose
|
w.Custom = w.StandardClose
|
||||||
|
w = w.NewBox("hBox", true)
|
||||||
} else {
|
} else {
|
||||||
w = n.NewTab("Flags")
|
w = n.NewTab("Flags")
|
||||||
}
|
}
|
||||||
|
|
||||||
g = w.NewGroup("Show")
|
g = w.NewGroup("Show").Pad()
|
||||||
|
|
||||||
g.NewButton("log.SetTmp()", func () {
|
g.NewButton("log.SetTmp()", func () {
|
||||||
newlog.SetTmp()
|
newlog.SetTmp()
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package gui
|
package gui
|
||||||
|
|
||||||
|
import (
|
||||||
|
newlog "go.wit.com/log"
|
||||||
|
)
|
||||||
|
|
||||||
// TODO: move all this shit into somewhere not global
|
// TODO: move all this shit into somewhere not global
|
||||||
|
|
||||||
// main debugging window
|
// main debugging window
|
||||||
|
@ -18,6 +22,9 @@ func DebugWindow() {
|
||||||
bugWin = me.rootNode.NewWindow("go.wit.com/gui debug window").DebugTab("Debug Tab")
|
bugWin = me.rootNode.NewWindow("go.wit.com/gui debug window").DebugTab("Debug Tab")
|
||||||
bugWin.Custom = bugWin.StandardClose
|
bugWin.Custom = bugWin.StandardClose
|
||||||
// bugWin.DebugTab("Debug Tab")
|
// bugWin.DebugTab("Debug Tab")
|
||||||
|
if newlog.ArgDebug() {
|
||||||
|
bugWin.DebugFlags(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *Node) DebugTab(title string) *Node {
|
func (n *Node) DebugTab(title string) *Node {
|
||||||
|
|
3
grid.go
3
grid.go
|
@ -32,6 +32,9 @@ func (n *Node) NewGrid(name string, w int, h int) *Node {
|
||||||
|
|
||||||
a := newAction(newNode, toolkit.Add)
|
a := newAction(newNode, toolkit.Add)
|
||||||
sendAction(a)
|
sendAction(a)
|
||||||
|
|
||||||
|
// by default, always pad grids
|
||||||
|
newNode.Pad()
|
||||||
return newNode
|
return newNode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
3
group.go
3
group.go
|
@ -14,6 +14,9 @@ func (parent *Node) NewGroup(name string) *Node {
|
||||||
a := newAction(newNode, toolkit.Add)
|
a := newAction(newNode, toolkit.Add)
|
||||||
sendAction(a)
|
sendAction(a)
|
||||||
|
|
||||||
|
// by default, always pad groups
|
||||||
|
newNode.Pad()
|
||||||
|
|
||||||
newBox := newNode.NewBox("defaultGroupBox", false)
|
newBox := newNode.NewBox("defaultGroupBox", false)
|
||||||
return newBox
|
return newBox
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue