-
Notifications
You must be signed in to change notification settings - Fork 1
/
theme.go
37 lines (31 loc) · 806 Bytes
/
theme.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
package resource
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/theme"
"image/color"
)
type CustomerTheme struct{}
func (t *CustomerTheme) Color(name fyne.ThemeColorName, variant fyne.ThemeVariant) color.Color {
return theme.LightTheme().Color(name, variant)
}
func (t *CustomerTheme) Icon(name fyne.ThemeIconName) fyne.Resource {
return theme.LightTheme().Icon(name)
}
func (t *CustomerTheme) Size(name fyne.ThemeSizeName) float32 {
return theme.LightTheme().Size(name)
}
func (*CustomerTheme) Font(s fyne.TextStyle) fyne.Resource {
//if s.Monospace {
// return theme.LightTheme().Font(s)
//}
//if s.Bold {
// if s.Italic {
// return theme.LightTheme().Font(s)
// }
// return ResourceFontNoto
//}
//if s.Italic {
// return theme.LightTheme().Font(s)
//}
return ResourceFontNoto()
}