-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbar_top.go
More file actions
36 lines (29 loc) · 933 Bytes
/
bar_top.go
File metadata and controls
36 lines (29 loc) · 933 Bytes
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
package main
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"
)
func topbar() *fyne.Container {
content := container.NewVBox(
container.NewCenter(container.NewGridWithColumns(3,
// we always want to know if we are connected
container.NewCenter(program.labels.connection),
// we also always want to know if we are logged in
container.NewCenter(program.labels.loggedin),
// gonna need to have access to an indexer
container.NewCenter(program.labels.indexer),
)),
)
// yeah... no sense in showing these settings right?
if !fyne.CurrentDevice().IsMobile() {
content.Add( // and have them fall horizontally
container.NewCenter(container.NewGridWithColumns(2,
// as well as if the web socket
program.labels.ws_server,
// also want to see if the rpc server is on
program.labels.rpc_server,
)))
}
// again, let's center this container
return container.NewCenter(content)
}