xintray/theme.go
Aaron Bieber 249015115c
Add system diff display
- change font to Go Regular for more characters
- Update deps
2023-06-27 20:07:15 -06:00

39 lines
736 B
Go

package main
import (
"image/color"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/theme"
)
type xinTheme struct{}
func (*xinTheme) Font(s fyne.TextStyle) fyne.Resource {
if s.Monospace {
return theme.DefaultTheme().Font(s)
}
if s.Bold {
if s.Italic {
return theme.DefaultTheme().Font(s)
}
return resourceGoRegularTtf
}
if s.Italic {
return theme.DefaultTheme().Font(s)
}
return resourceGoRegularTtf
}
func (*xinTheme) Color(n fyne.ThemeColorName, v fyne.ThemeVariant) color.Color {
return theme.DefaultTheme().Color(n, v)
}
func (*xinTheme) Icon(n fyne.ThemeIconName) fyne.Resource {
return theme.DefaultTheme().Icon(n)
}
func (*xinTheme) Size(n fyne.ThemeSizeName) float32 {
return theme.DefaultTheme().Size(n)
}