summaryrefslogtreecommitdiff
path: root/window.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-19 12:18:11 -0600
committerJeff Carr <[email protected]>2024-01-19 12:18:11 -0600
commitf48b950655f57cb02bbd754ba0043a953956f888 (patch)
tree7547dd1b167536fe9cb4c6f42e6675b5ac0d89d1 /window.go
parentc2a563ae37d11f8374df6c7f00661369f4d5a76f (diff)
things are moving to widget.Statev0.0.9
pass borderless windows correctly destroy themselves from the binary tree checkbox state cleanups Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'window.go')
-rw-r--r--window.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/window.go b/window.go
index c61cbdb..804c1aa 100644
--- a/window.go
+++ b/window.go
@@ -19,13 +19,14 @@ func newWindow(p, n *tree.Node) {
var newt *guiWidget
newt = new(guiWidget)
- // menubar bool is if the OS defined border on the window should be used
- win := ui.NewWindow(n.GetProgName(), 640, 480, menubar)
- win.SetBorderless(canvas)
- win.SetMargined(margin)
+ // bool == false is if the OS defined border on the window should be used
+ win := ui.NewWindow(n.GetProgName(), 640, 480, n.State.Borderless)
+ win.SetBorderless(n.State.Borderless)
+ win.SetMargined(n.State.Pad)
win.OnClosing(func(*ui.Window) bool {
// show(n, false)
me.myTree.SendWindowCloseEvent(n)
+ n.DeleteNode()
return true
})
newt.uiWindow = win