From 898b9e27c485474954e7b12b3edf5498ffabde72 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 2 Jun 2019 12:14:20 -0700 Subject: [PATCH] more code cleanup Signed-off-by: Jeff Carr --- box.go | 8 ++++---- misc.go | 16 ---------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/box.go b/box.go index a8c2c46..61ea46e 100644 --- a/box.go +++ b/box.go @@ -167,8 +167,8 @@ func CreateGenericBox(gw *GuiWindow, b *GuiButton, name string) *GuiBox{ hbox.SetPadded(true) vbox.Append(hbox, false) - AddBoxToTab(name, gw.UiTab, vbox) - + gw.UiTab.Append(name, vbox) + gw.UiTab.SetMargined(0, true) return box } @@ -196,7 +196,7 @@ func CreateBox(gw *GuiWindow, name string) *GuiBox { box.UiBox = hboxAccount - AddBoxToTab(name, gw.UiTab, vbox) - + gw.UiTab.Append(name, vbox) + gw.UiTab.SetMargined(0, true) return box } diff --git a/misc.go b/misc.go index 3e86a88..ed7adc5 100644 --- a/misc.go +++ b/misc.go @@ -69,12 +69,6 @@ func StartNewWindow(c *pb.Config, bg bool, action string, maketab func(*GuiWindo } } -func getSplashText(a string) *ui.AttributedString { - var aText *ui.AttributedString - aText = ui.NewAttributedString(a) - return aText -} - func InitTabWindow(gw *GuiWindow) { log.Println("InitTabWindow() THIS WINDOW IS NOT YET SHOWN") @@ -100,19 +94,9 @@ func InitTabWindow(gw *GuiWindow) { log.Println("InitTabWindow() gw =", gw) gw.MakeWindow(gw) - -// abox := gw.MakeWindow(gw) -// gw.UiTab.Append("WIT Splash", abox.UiBox) -// gw.UiTab.SetMargined(0, true) - gw.UiWindow.Show() } -func AddBoxToTab(name string, tab *ui.Tab, box *ui.Box) { - tab.Append(name, box) - tab.SetMargined(0, true) -} - /* // string handling examples that might be helpful for normalizeInt() isAlpha := regexp.MustCompile(`^[A-Za-z]+$`).MatchString