-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathui.go
50 lines (40 loc) · 1.22 KB
/
ui.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package main
import (
appheader "nsw-finance/components/app-header"
passabletab "nsw-finance/components/passable-tab"
savingstab "nsw-finance/components/savings-tab"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/theme"
)
func (app *App) makeUI() {
/**
* Get App Header
*/
appHeaderContainer := appheader.GetAppHeaderContainer()
/*
* Get App Tabs
*/
// Savings Tab
savingsTab := &savingstab.SavingsTab{
DB: app.SavingsDB,
InfoLog: app.Utils.InfoLog,
ErrorLog: app.Utils.ErrorLog,
}
savingsContainer := savingsTab.GetSavingsTab()
app.UIComponents.SavingsContainer = savingsContainer
// Passable Tab
passableTab := &passabletab.PassableTab{
InfpLog: app.Utils.InfoLog,
ErrorLog: app.Utils.ErrorLog,
}
passableContainer := passableTab.GetPassableTab()
app.UIComponents.PassableContainer = passableContainer
tabs := container.NewAppTabs(
container.NewTabItemWithIcon("Savings", theme.FileIcon(), savingsContainer),
container.NewTabItemWithIcon("Passable", theme.ConfirmIcon(), passableContainer),
)
tabs.SetTabLocation(container.TabLocationLeading)
// add container to window
finalContent := container.NewBorder(appHeaderContainer, nil, nil, nil, tabs)
app.MainWindow.SetContent(finalContent)
}