From 55ea779640098ce71a5f36785634f4e22f3cd601 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 25 Apr 2023 22:24:45 -0500 Subject: gocui: hmm. trying to reformat the layout Signed-off-by: Jeff Carr --- toolkit/gocui/tab.go | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'toolkit/gocui/tab.go') 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:") } -- cgit v1.2.3