summaryrefslogtreecommitdiff
path: root/tab.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-29 23:01:39 -0600
committerJeff Carr <[email protected]>2024-01-29 23:01:39 -0600
commit5ef1bd10213a8e6a8b96ed1ca67a91ceb7f026fd (patch)
tree6659d0d1ce6f628577267bc0b03e0bdf3976bd16 /tab.go
parentd97ce2aecc08cdaae49b5885453deee9260aaf06 (diff)
window widgets are being displayed
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'tab.go')
-rw-r--r--tab.go45
1 files changed, 14 insertions, 31 deletions
diff --git a/tab.go b/tab.go
index d73847d..3ab1ba4 100644
--- a/tab.go
+++ b/tab.go
@@ -49,41 +49,24 @@ func (tk *guiWidget) gocuiSetWH(sizeW, sizeH int) {
}
}
-func redoWindows(nextW int, nextH int) {
- wRoot := me.treeRoot.TK.(*guiWidget)
- for _, win := range wRoot.children {
- if win.node.WidgetType != widget.Window {
+func (w *guiWidget) redoWindows(nextW int, nextH int) {
+ var startW int = nextW
+ var startH int = nextH
+
+ for _, child := range w.children {
+ if child.node.WidgetType != widget.Window {
continue
}
- var tabs bool
- for _, child := range win.children {
- if child.node.WidgetType == widget.Tab {
- tabs = true
- }
- }
- if tabs {
- // window is tabs. Don't show it as a standard button
- win.frame = false
- win.hasTabs = true
- } else {
- win.frame = false
- win.hasTabs = false
- }
-
- win.gocuiSetWH(nextW, nextH)
- win.deleteView()
- win.showView()
- /*
- sizeW := win.Width() + me.WindowPadW
- sizeH := win.Height()
- nextW += sizeW
- log.Log(NOW, "redoWindows() start nextW,H =", nextW, nextH, "gocuiSize.W,H =", sizeW, sizeH, win.String())
+ child.frame = false
+ child.hasTabs = false
- if win.hasTabs {
- win.redoTabs(me.TabW, me.TabH)
- }
- */
+ child.gocuiSetWH(nextW, nextH)
+ child.deleteView()
+ child.showView()
+ sizeW := child.gocuiSize.Width()
+ nextW += sizeW + 4
+ child.redoWindows(startW + 3, startH + 2)
}
}