Files
AynaLivePlayer/gui/theme.go
Aynakeya 5cc5948a85 Merge 1.0.x branch (#8)
* rewrite

* update submodule

* make width height configurable

* update dependency

* update

* update file

* update dep

* fix basic config layout

* update plugin management

* more stuff

* add blacklist

* fix todo

* fix windows gethandle

* update windows update guide

* update windows build guide

* include go mod tidy in script

* update todo

* fix source session

* fix text output

* add plugin play duration control

* fix id diange not working

* update todo

* update version number
2024-04-22 21:21:02 -07:00

43 lines
814 B
Go

package gui
import (
"AynaLivePlayer/resource"
"fyne.io/fyne/v2"
"image/color"
xtheme "fyne.io/x/fyne/theme"
)
type myTheme struct{}
var _ fyne.Theme = (*myTheme)(nil)
// return bundled font resource
func (*myTheme) Font(s fyne.TextStyle) fyne.Resource {
if s.Monospace {
return resource.FontMSYaHei
}
if s.Bold {
if s.Italic {
return resource.FontMSYaHeiBold
}
return resource.FontMSYaHei
}
if s.Italic {
return resource.FontMSYaHei
}
return resource.FontMSYaHei
}
func (*myTheme) Color(n fyne.ThemeColorName, v fyne.ThemeVariant) color.Color {
return xtheme.AdwaitaTheme().Color(n, v)
}
func (*myTheme) Icon(n fyne.ThemeIconName) fyne.Resource {
return xtheme.AdwaitaTheme().Icon(n)
}
func (*myTheme) Size(n fyne.ThemeSizeName) float32 {
return xtheme.AdwaitaTheme().Size(n)
}