We do not need to know what time it is
This commit is contained in:
parent
c17f2d202b
commit
d326e16393
1 changed files with 1 additions and 17 deletions
|
@ -3,7 +3,6 @@ package main
|
|||
import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/app"
|
||||
|
@ -13,11 +12,6 @@ import (
|
|||
"fyne.io/fyne/v2/widget"
|
||||
)
|
||||
|
||||
func updateTime(clock *widget.Label) {
|
||||
formatted := time.Now().Format("Time: 03:04:05")
|
||||
clock.SetText(formatted)
|
||||
}
|
||||
|
||||
// Define your custom struct
|
||||
type MyStruct struct {
|
||||
Name string
|
||||
|
@ -66,10 +60,6 @@ var myList = []MyStruct{
|
|||
}
|
||||
|
||||
func main() {
|
||||
clock := widget.NewLabel("")
|
||||
formatted := time.Now().Format("Time: 03:04:05")
|
||||
clock.SetText(formatted)
|
||||
|
||||
a := app.New()
|
||||
w := a.NewWindow(fmt.Sprintf("RexForge %s", git_rev))
|
||||
w.Resize(fyne.NewSize(900, 600))
|
||||
|
@ -98,12 +88,6 @@ func main() {
|
|||
o.(*fyne.Container).Add(row)
|
||||
})
|
||||
|
||||
go func() {
|
||||
for range time.Tick(time.Second) {
|
||||
updateTime(clock)
|
||||
}
|
||||
}()
|
||||
|
||||
refresh_button := widget.NewButtonWithIcon("Refresh", theme.ViewRefreshIcon(), func() {
|
||||
println("Refresh")
|
||||
})
|
||||
|
@ -121,7 +105,7 @@ func main() {
|
|||
})
|
||||
|
||||
toprow := container.NewVBox(container.NewHBox(refresh_button, upall_button,
|
||||
clock, layout.NewSpacer(), about_button, settings_button),
|
||||
layout.NewSpacer(), about_button, settings_button),
|
||||
widget.NewSeparator())
|
||||
|
||||
c := container.New(
|
||||
|
|
Loading…
Add table
Reference in a new issue