summaryrefslogtreecommitdiff
path: root/toolkit/gocui/tab.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-25 22:24:45 -0500
committerJeff Carr <[email protected]>2023-04-25 22:24:45 -0500
commit55ea779640098ce71a5f36785634f4e22f3cd601 (patch)
tree2e909de2b4790d4d01c92ebba4785e642a6efd09 /toolkit/gocui/tab.go
parent2de69d0086a5d97a91647ecadf438ac3989759a8 (diff)
gocui: hmm. trying to reformat the layout
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/tab.go')
-rw-r--r--toolkit/gocui/tab.go17
1 files changed, 5 insertions, 12 deletions
diff --git a/toolkit/gocui/tab.go b/toolkit/gocui/tab.go
index 7e25545..18f6ec7 100644
--- a/toolkit/gocui/tab.go
+++ b/toolkit/gocui/tab.go
@@ -55,19 +55,17 @@ func (w *cuiWidget) showWidgets() {
func (w *cuiWidget) setTabWH() {
// set the start and size of the tab gocui button
t := len(w.text)
- w.gocuiSize.width = t + me.buttonPadding
- w.gocuiSize.height = me.defaultHeight
+ w.gocuiSize.width = t + me.PadW
+ w.gocuiSize.height = me.DefaultHeight + me.PadH
w.gocuiSize.w0 = me.rootNode.nextW
w.gocuiSize.h0 = me.rootNode.nextH
+ w.realWidth = w.gocuiSize.width + me.FramePadW
+ w.realHeight = w.gocuiSize.height + me.FramePadH
+
// move the rootNode width over for the next window or tab
me.rootNode.nextW += w.gocuiSize.width + me.TabPadW
- w.startW = me.rawW
- w.startH = me.rawH
- w.nextW = me.rawW
- w.nextH = me.rawH
-
w.setWH()
w.showWidgetPlacement(logNow, "setTabWH:")
}
@@ -83,11 +81,6 @@ func (w *cuiWidget) setLabel() {
// move the rootNode width over for the next window or tab
me.rootNode.nextW += w.gocuiSize.width
- w.startW = me.rawW
- w.startH = me.rawH
- w.nextW = me.rawW
- w.nextH = me.rawH
-
w.setWH()
w.showWidgetPlacement(logNow, "setLabel:")
}