maybe stable with the dns control panel
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
99bb171bd9
commit
e4339f33ac
8
click.go
8
click.go
|
@ -120,17 +120,17 @@ func (w *guiWidget) doWidgetClick() {
|
|||
w.setColor(&colorActiveW)
|
||||
|
||||
w.active = false
|
||||
w.dumpTree("before")
|
||||
// w.dumpTree("before")
|
||||
w.placeWidgets(3, 2)
|
||||
w.showWidgets()
|
||||
|
||||
hideFake()
|
||||
showDebug = true
|
||||
|
||||
w.dumpTree("after")
|
||||
// w.dumpTree("after")
|
||||
case widget.Group:
|
||||
// n.placeWidgets(p.tk.startH, newH)
|
||||
w.dumpTree("click start")
|
||||
// w.dumpTree("click start")
|
||||
if w.active {
|
||||
w.active = false
|
||||
w.placeWidgets(w.startW, w.startH)
|
||||
|
@ -148,7 +148,7 @@ func (w *guiWidget) doWidgetClick() {
|
|||
child.hideWidgets()
|
||||
}
|
||||
}
|
||||
w.dumpTree("click end")
|
||||
// w.dumpTree("click end")
|
||||
case widget.Checkbox:
|
||||
if widget.GetBool(w.value) {
|
||||
w.setCheckbox(false)
|
||||
|
|
24
place.go
24
place.go
|
@ -12,28 +12,28 @@ func (tk *guiWidget) placeBox(startW int, startH int) {
|
|||
if tk.WidgetType != widget.Box {
|
||||
return
|
||||
}
|
||||
tk.dumpTree("beforebox")
|
||||
// tk.dumpTree("beforebox")
|
||||
|
||||
newW := startW
|
||||
newH := startH
|
||||
|
||||
for _, child := range tk.children {
|
||||
sizeW, sizeH := child.Size()
|
||||
log.Log(NOW, "BOX START size(W,H) =", sizeW, sizeH, "new(W,H) =", newW, newH)
|
||||
log.Log(INFO, "BOX START size(W,H) =", sizeW, sizeH, "new(W,H) =", newW, newH)
|
||||
child.placeWidgets(newW, newH)
|
||||
sizeW, sizeH = child.Size()
|
||||
if child.direction == widget.Horizontal {
|
||||
log.Log(NOW, "BOX IS HORIZONTAL", tk.String(), "newWH()", newW, newH, "child()", sizeW, sizeH, child.String())
|
||||
log.Log(INFO, "BOX IS HORIZONTAL", tk.String(), "newWH()", newW, newH, "child()", sizeW, sizeH, child.String())
|
||||
// expand based on the child width
|
||||
newW += sizeW
|
||||
} else {
|
||||
log.Log(NOW, "BOX IS VERTICAL ", tk.String(), "newWH()", newW, newH, "child()", sizeW, sizeH, child.String())
|
||||
log.Log(INFO, "BOX IS VERTICAL ", tk.String(), "newWH()", newW, newH, "child()", sizeW, sizeH, child.String())
|
||||
// expand based on the child height
|
||||
newH += sizeH
|
||||
}
|
||||
log.Log(NOW, "BOX END size(W,H) =", sizeW, sizeH, "new(W,H) =", newW, newH)
|
||||
log.Log(INFO, "BOX END size(W,H) =", sizeW, sizeH, "new(W,H) =", newW, newH)
|
||||
}
|
||||
tk.dumpTree("afterbox")
|
||||
// tk.dumpTree("afterbox")
|
||||
}
|
||||
|
||||
func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) {
|
||||
|
@ -74,7 +74,7 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) {
|
|||
case widget.Group:
|
||||
// move the group to the parent's next location
|
||||
tk.gocuiSetWH(startW, startH)
|
||||
tk.dumpTree("start place")
|
||||
// tk.dumpTree("start place")
|
||||
|
||||
newW := startW + me.GroupPadW
|
||||
newH := startH + 1 // normal hight of the group label
|
||||
|
@ -93,7 +93,7 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) {
|
|||
}
|
||||
log.Log(INFO, "REAL HEIGHT sizeW:", sizeW, "sizeH:", sizeH)
|
||||
}
|
||||
tk.dumpTree("end place")
|
||||
// tk.dumpTree("end place")
|
||||
return maxW, newH - startH
|
||||
default:
|
||||
tk.gocuiSetWH(startW, startH)
|
||||
|
@ -103,7 +103,7 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) {
|
|||
}
|
||||
|
||||
func (w *guiWidget) placeGrid(startW int, startH int) (int, int) {
|
||||
w.showWidgetPlacement("grid0:")
|
||||
// w.showWidgetPlacement("grid0:")
|
||||
if w.WidgetType != widget.Grid {
|
||||
return 0, 0
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ func (w *guiWidget) placeGrid(startW int, startH int) (int, int) {
|
|||
|
||||
// find the width and height offset of the grid for AtW,AtH
|
||||
for _, child := range w.children {
|
||||
child.showWidgetPlacement("grid1:")
|
||||
// child.showWidgetPlacement("grid1:")
|
||||
|
||||
var totalW, totalH int
|
||||
for i, w := range w.widths {
|
||||
|
@ -155,9 +155,9 @@ func (w *guiWidget) placeGrid(startW int, startH int) (int, int) {
|
|||
|
||||
log.Log(INFO, "placeGrid:", child.String(), "new()", newW, newH, "At()", child.node.State.AtW, child.node.State.AtH)
|
||||
child.placeWidgets(newW, newH)
|
||||
child.showWidgetPlacement("grid2:")
|
||||
// child.showWidgetPlacement("grid2:")
|
||||
}
|
||||
w.showWidgetPlacement("grid3:")
|
||||
// w.showWidgetPlacement("grid3:")
|
||||
return maxW, maxH
|
||||
}
|
||||
|
||||
|
|
4
view.go
4
view.go
|
@ -43,7 +43,7 @@ func (w *guiWidget) textResize() bool {
|
|||
changed = true
|
||||
}
|
||||
if changed {
|
||||
w.showWidgetPlacement("textResize() changed")
|
||||
// w.showWidgetPlacement("textResize() changed")
|
||||
}
|
||||
return changed
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ func (w *guiWidget) showWidgets() {
|
|||
if w.isFake {
|
||||
// don't display by default
|
||||
} else {
|
||||
w.showWidgetPlacement("current:")
|
||||
// w.showWidgetPlacement("current:")
|
||||
w.showView()
|
||||
}
|
||||
for _, child := range w.children {
|
||||
|
|
Loading…
Reference in New Issue