summaryrefslogtreecommitdiff
path: root/toolkit/gocui/tab.go
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/gocui/tab.go')
-rw-r--r--toolkit/gocui/tab.go37
1 files changed, 3 insertions, 34 deletions
diff --git a/toolkit/gocui/tab.go b/toolkit/gocui/tab.go
index 088577b..d2e604c 100644
--- a/toolkit/gocui/tab.go
+++ b/toolkit/gocui/tab.go
@@ -57,6 +57,9 @@ func (w *cuiWidget) setTabWH() {
w.gocuiSize.startW = me.rootNode.startW
w.gocuiSize.startH = me.rootNode.startH
+ w.startW = w.gocuiSize.startW + 2
+ w.startH = w.gocuiSize.startH + 3
+
for _, child := range me.rootNode.children {
if (child.isFake) {
continue
@@ -69,51 +72,17 @@ func (w *cuiWidget) setTabWH() {
w.gocuiSize.startW += child.realWidth
}
- w.startW = me.rootNode.startW
- w.startH = me.rootNode.startH + me.buttonPadding
-
w.setWH()
w.showWidgetPlacement(logNow, "setTabWH:")
}
func (w *cuiWidget) redoTabs(draw bool) {
- if (w == nil) {
- return
- }
- log(logVerbose, "redoTabs() START about to check for window and tab ", w.name)
- w.text = w.name
- t := len(w.text)
if ((w.widgetType == toolkit.Window) || (w.widgetType == toolkit.Tab)) {
- log(logVerbose, "redoTabs() in Window and Tab", w.name)
- w.realWidth = t + me.buttonPadding
- w.realHeight = me.defaultHeight
-
- w.gocuiSize.w0 = me.rootNode.logicalSize.w1
- w.gocuiSize.w1 = w.gocuiSize.w0 + w.realWidth
- w.gocuiSize.h0 = 0
- w.gocuiSize.h1 = w.realHeight
-
- // start logical sizes windows and in the top left corner
- w.logicalSize.w0 = 2
- w.logicalSize.w1 = 2
- w.logicalSize.h0 = w.realHeight
- w.logicalSize.h1 = w.realHeight
-
- // start all windows and in the top left corner
- w.nextW = w.logicalSize.w0
- w.nextH = w.logicalSize.h0
-
- me.rootNode.logicalSize.w1 = w.gocuiSize.w1
- me.rootNode.logicalSize.h1 = w.gocuiSize.h1
-
w.deleteView()
w.drawView()
- w.showWidgetPlacement(logNow, "redoTabs()")
}
- log(logVerbose, "redoTabs() about to for loop children", w.name)
for _, child := range w.children {
- log(logVerbose, "redoTabs() got to child", child.name)
child.redoTabs(draw)
}
}