forked from secretnamebasis/simple-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtools.go
More file actions
46 lines (37 loc) · 1.03 KB
/
tools.go
File metadata and controls
46 lines (37 loc) · 1.03 KB
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
// this is the largest part of the repo, and the most fun.
package main
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/layout"
)
func tools() *fyne.Container {
// let's do this when we click on tool
program.hyperlinks.tools.OnTapped = func() {
updateHeader(program.hyperlinks.tools)
program.window.SetContent(program.containers.tools)
}
// let's set the functions for each of these links
program.buttons.explorer.OnTapped = explorer
program.buttons.encryption.OnTapped = encryption
program.buttons.contracts.OnTapped = contracts
// and then set them
program.containers.toolbox = container.NewVBox(
program.buttons.encryption,
program.buttons.explorer,
program.buttons.contracts,
)
// and now, let's hide them
program.containers.toolbox.Hide()
return container.NewVBox(
program.containers.topbar,
layout.NewSpacer(),
container.NewAdaptiveGrid(3,
layout.NewSpacer(),
program.containers.toolbox,
layout.NewSpacer(),
),
layout.NewSpacer(),
program.containers.bottombar,
)
}