From 3367793ea521947c5fd2da6e42a09b7334fefc30 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 22 May 2019 17:15:22 -0700 Subject: [PATCH] start making tabs to test behavior under Windows Signed-off-by: Jeff Carr --- account1/addAccount.go | 5 ++--- test2/main.go | 18 +++++++++++------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/account1/addAccount.go b/account1/addAccount.go index bbd4858..bb9e891 100644 --- a/account1/addAccount.go +++ b/account1/addAccount.go @@ -49,7 +49,7 @@ func AddAccountWindow() { // END add account hbox } -func AddAccountBox(vbox *ui.Box, custom func(int, string)) *ui.Box { +func AddAccountBox(junk *ui.Box, custom func(int, string)) *ui.Box { newbox := ui.NewVerticalBox() newbox.SetPadded(true) @@ -62,6 +62,5 @@ func AddAccountBox(vbox *ui.Box, custom func(int, string)) *ui.Box { okButton := gui.CreateButton("I Have an Account", "CLOSE", custom) newbox.Append(okButton, false) - vbox.Append(newbox, true) - return vbox + return newbox } diff --git a/test2/main.go b/test2/main.go index a2ea953..ac1fb10 100644 --- a/test2/main.go +++ b/test2/main.go @@ -52,7 +52,9 @@ func watchGUI() { if (state == "splash") { log.Println("Display the splash box") - smallBox = account1.AddAccountBox(cloudBox, splashClose) + smallBox = account1.AddAccountBox(nil, splashClose) + cloudTab.Append("Intro", smallBox) + cloudTab.SetMargined(0, true) // newbox.SetPadded(true) state = "done" } @@ -66,7 +68,9 @@ func watchGUI() { } if (state == "account1") { log.Println("Display the splash box") - smallBox = splash.ShowSplashBox(cloudBox, nil, splashClose) + smallBox = splash.ShowSplashBox(nil, nil, splashClose) + cloudTab.Append("WIT Account", smallBox) + cloudTab.SetMargined(0, true) // newbox.SetPadded(true) state = "done" } @@ -90,15 +94,15 @@ func makeCloudWindow() { // cloudWindow.SetChild(cloudBox) // cloudWindow.SetMargined(true) - tab := ui.NewTab() - cloudWindow.SetChild(tab) + cloudTab = ui.NewTab() + cloudWindow.SetChild(cloudTab) cloudWindow.SetMargined(true) cloudBox = splash.ShowSplashBox(nil, nil, buttonClick) - tab.Append("WIT Splash", cloudBox) - tab.SetMargined(0, true) + cloudTab.Append("WIT Splash", cloudBox) + cloudTab.SetMargined(0, true) cloudWindow.Show() - state = "done" + state = "splash" }