summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-14 10:37:43 -0600
committerJeff Carr <[email protected]>2024-01-14 10:37:43 -0600
commitbe35668f0bbcffd1a23244fd2f422ad0356ed064 (patch)
treef4d8ff36fd3e037cc14dceda4ada27892a2e1ebb
parent47b15946de10a75cda026a7317a90d4857b453c8 (diff)
working on margin()v0.12.6
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--action.go2
-rw-r--r--common.go14
2 files changed, 14 insertions, 2 deletions
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