0.0.0 第一次提交

This commit is contained in:
2024-09-09 20:29:21 +08:00
commit 39dd34ed66
10 changed files with 909 additions and 0 deletions
Binary file not shown.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

BIN
View File
Binary file not shown.
+53
View File
@@ -0,0 +1,53 @@
package assets
import (
_ "embed"
"image/color"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/theme"
)
type MyTheme struct{}
var _ fyne.Theme = (*MyTheme)(nil)
//go:embed simkai.ttf
var arialNovaLight []byte
//go:embed logo.jpg
var logoData []byte
var LogoDataSR = &fyne.StaticResource{
StaticName: "logo.jpg",
StaticContent: logoData,
}
var arialNovaLightSR = &fyne.StaticResource{
StaticName: "simkai.ttf",
StaticContent: arialNovaLight,
}
func (*MyTheme) Font(s fyne.TextStyle) fyne.Resource {
if s.Monospace {
return theme.DefaultTheme().Font(s)
}
return arialNovaLightSR
}
func (*MyTheme) Color(n fyne.ThemeColorName, v fyne.ThemeVariant) color.Color {
switch n {
case theme.ColorNameButton:
return color.Transparent
default:
return theme.DefaultTheme().Color(n, v)
}
}
func (*MyTheme) Icon(n fyne.ThemeIconName) fyne.Resource {
return theme.DefaultTheme().Icon(n)
}
func (*MyTheme) Size(n fyne.ThemeSizeName) float32 {
return theme.DefaultTheme().Size(n)
}