-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
31 lines (26 loc) · 848 Bytes
/
main.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
package main
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/theme"
ui "github.com/GopherGhaznix/FyneWeather/UI"
"github.com/GopherGhaznix/FyneWeather/bundled"
"github.com/GopherGhaznix/FyneWeather/config"
"github.com/GopherGhaznix/FyneWeather/state"
)
func init() {
config.FontTekoBold = fyne.NewStaticResource("Teko Light", bundled.ResourceTekoSemiBoldTtf.Content())
config.FontTekoNormal = fyne.NewStaticResource("Teko Light Normal", bundled.ResourceTekoRegularTtf.Content())
}
func main() {
a := app.New()
a.Settings().SetTheme(theme.DarkTheme())
w := a.NewWindow("Hello World")
w.Resize(fyne.NewSize(320, 580))
// init boths screens
state.TodayWindow = ui.TodayScreen()
state.WeeklyWindow = ui.WeeklyScreen()
state.CurrentWindow = ui.ScreenHandler()
w.SetContent(state.CurrentWindow)
w.ShowAndRun()
}