-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmecchi-loader.go
43 lines (33 loc) · 896 Bytes
/
mecchi-loader.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
package main
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/layout"
"fyne.io/fyne/v2/widget"
)
func main() {
mecchiLoader := app.New()
window := mecchiLoader.NewWindow("Mecchi Loader")
window.Resize(fyne.NewSize(WindowWidth, WindowHeight))
input := widget.NewMultiLineEntry()
input.MultiLine = true
input.SetMinRowsVisible(10)
input.Wrapping = fyne.TextWrapWord
infinite := widget.NewProgressBarInfinite()
infinite.Hide()
loading := func(show bool) {
if show {
infinite.Show()
} else {
infinite.Hide()
}
}
tabs := container.NewAppTabs(
container.NewTabItem("Main", MainUi(input, loading)),
container.NewTabItem("Services", ServicesUi(input, loading)),
)
tabs.SetTabLocation(container.TabLocationTop)
window.SetContent(container.NewVBox(tabs, layout.NewSpacer(), infinite, input))
window.ShowAndRun()
}