Documentation ¶
Index ¶
- Constants
- Variables
- func BlendColors(a, b color.Color, fractionA float64) color.Color
- func ColorStringToColor(colorStr string) (color.Color, error)
- func WithColorTransformOverride(name fyne.ThemeColorName, transform func(color.Color) color.Color) fyne.Theme
- type AppearanceMode
- type MyTheme
- func (m *MyTheme) Color(name fyne.ThemeColorName, _ fyne.ThemeVariant) color.Color
- func (m *MyTheme) Font(style fyne.TextStyle) fyne.Resource
- func (m *MyTheme) Icon(name fyne.ThemeIconName) fyne.Resource
- func (m *MyTheme) ListThemeFiles() map[string]string
- func (m *MyTheme) Size(name fyne.ThemeSizeName) float32
- type ThemeColors
- type ThemeFile
- type ThemeFileHeader
- type ThemedRectangle
Constants ¶
View Source
const ( ColorNameListHeader fyne.ThemeColorName = "ListHeader" ColorNamePageBackground fyne.ThemeColorName = "PageBackground" ColorNamePageHeader fyne.ThemeColorName = "PageHeader" ColorNameInactiveLyric fyne.ThemeColorName = "InactiveLyric" ColorNameIconButton fyne.ThemeColorName = "IconButton" ColorNameHoveredIconButton fyne.ThemeColorName = "HoveredIconButton" ColorNameNowPlayingPanel fyne.ThemeColorName = "NowPlayingPanel" SizeNameSubSubHeadingText fyne.ThemeSizeName = "subSubHeadingText" // in between Text and SubHeadingText SizeNameSubText fyne.ThemeSizeName = "subText" // in between Text and Caption SizeNameSuffixText fyne.ThemeSizeName = "suffixText" // a tiny bit smaller than subText )
Variables ¶
View Source
var ( AlbumIcon fyne.Resource = theme.NewThemedResource(res.ResDiscSvg) ArtistIcon fyne.Resource = theme.NewThemedResource(res.ResPeopleSvg) RadioIcon fyne.Resource = theme.NewThemedResource(res.ResBroadcastSvg) FavoriteIcon fyne.Resource = theme.NewThemedResource(res.ResHeartFilledSvg) NotFavoriteIcon fyne.Resource = theme.NewThemedResource(res.ResHeartOutlineSvg) NowPlayingIcon fyne.Resource = theme.NewThemedResource(res.ResHeadphonesSvg) PlaylistIcon fyne.Resource = theme.NewThemedResource(res.ResPlaylistSvg) PlayNextIcon fyne.Resource = theme.NewThemedResource(res.ResPlaylistAddNextSvg) PlayQueueIcon fyne.Resource = theme.NewThemedResource(res.ResPlayqueueSvg) ShuffleIcon fyne.Resource = theme.NewThemedResource(res.ResShuffleSvg) TracksIcon fyne.Resource = theme.NewThemedResource(res.ResMusicnotesSvg) GenreIcon fyne.Resource = theme.NewThemedResource(res.ResTheatermasksSvg) FilterIcon fyne.Resource = theme.NewThemedResource(res.ResFilterSvg) RepeatIcon fyne.Resource = theme.NewThemedResource(res.ResRepeatSvg) RepeatOneIcon fyne.Resource = theme.NewThemedResource(res.ResRepeatoneSvg) SortIcon fyne.Resource = theme.NewThemedResource(res.ResUpdownarrowSvg) )
Functions ¶
func BlendColors ¶ added in v0.13.0
func ColorStringToColor ¶ added in v0.4.0
Parses a CSS-style #RRGGBB or #RRGGBBAA string
Types ¶
type AppearanceMode ¶
type AppearanceMode string
const ( AppearanceLight AppearanceMode = "Light" AppearanceDark AppearanceMode = "Dark" AppearanceAuto AppearanceMode = "Auto" DefaultAppearance AppearanceMode = AppearanceDark )
type MyTheme ¶
func NewMyTheme ¶
func NewMyTheme(config *backend.ThemeConfig, themeFileDir string) *MyTheme
func (*MyTheme) ListThemeFiles ¶ added in v0.4.0
Returns a map [themeFileName] -> displayName
type ThemeColors ¶ added in v0.4.0
type ThemeColors struct { // Background color of the header row in list views. ListHeader string // Background color for each page. The main color in the app. PageBackground string // Color of the background rectangle around the Album, Artist, Playlist page headers. // // Since: Supersonic theme file version 0.2 PageHeader string Background string Button string DisabledButton string Disabled string Error string Focus string Foreground string Hover string // since Supersonic theme file version 0.2 (Fyne version 2.4) Hyperlink string InputBackground string InputBorder string MenuBackground string OverlayBackground string Placeholder string Pressed string Primary string ScrollBar string Selection string Separator string Shadow string Success string Warning string }
type ThemeFile ¶ added in v0.4.0
type ThemeFile struct { SupersonicTheme ThemeFileHeader DarkColors ThemeColors LightColors ThemeColors }
func ReadThemeFile ¶ added in v0.4.0
func (*ThemeFile) SupportsVariant ¶ added in v0.4.0
type ThemeFileHeader ¶ added in v0.4.0
type ThemedRectangle ¶
type ThemedRectangle struct { widget.BaseWidget ColorName fyne.ThemeColorName Translucent bool BorderWidth float32 BorderColorName fyne.ThemeColorName CornerRadiusName fyne.ThemeSizeName // contains filtered or unexported fields }
func NewThemedRectangle ¶
func NewThemedRectangle(colorName fyne.ThemeColorName) *ThemedRectangle
func (*ThemedRectangle) CreateRenderer ¶
func (t *ThemedRectangle) CreateRenderer() fyne.WidgetRenderer
func (*ThemedRectangle) Refresh ¶
func (t *ThemedRectangle) Refresh()
Click to show internal directories.
Click to hide internal directories.