diff --git a/action.go b/action.go index 516cf15..e0d2690 100644 --- a/action.go +++ b/action.go @@ -36,8 +36,6 @@ func sendAction(n *Node, atype widget.ActionType) { a.Strings = n.strings // These should be improved/deprecated based on the gui/widget docs - a.Expand = n.expand - a.X = n.X a.Y = n.Y diff --git a/common.go b/common.go index 6c31758..7430f98 100644 --- a/common.go +++ b/common.go @@ -17,6 +17,13 @@ func (n *Node) Show() *Node { n.hidden = false n.changed = true + if n.WidgetType == widget.Window { + log.Warn("Show on a hidden window", n.progname) + log.Warn("this needs to do TestDraw()") + n.TestDraw() + return n + } + // inform the toolkits sendAction(n, widget.Show) return n @@ -26,6 +33,11 @@ func (n *Node) Hide() *Node { if ! n.Ready() { return n } if n.Hidden() { return n } + if n.WidgetType == widget.Window { + log.Warn("Hide on a window", n.progname) + log.Warn("this needs to do TestDestroy() ?") + } + n.hidden = true n.changed = true // inform the toolkits @@ -160,6 +172,7 @@ func (n *Node) Margin() *Node { n.margin = true n.changed = true + log.Warn("Margin()", n.WidgetType, n.progname) // inform the toolkits sendAction(n, widget.Margin) return n @@ -184,6 +197,7 @@ func (n *Node) Pad() *Node { n.pad = true n.changed = true + log.Warn("Pad()", n.WidgetType, n.progname) // inform the toolkits sendAction(n, widget.Pad) return n