Theme
Table of contents
Interface to describe application theme
Create from source
func CreateThemeFromText(text string) (Theme, bool)
Creates a new theme from text and return its interface on success
func NewTheme(name string) Theme
Creates a new theme with specific name and return its interface
Interface description
Inherit methods from fmt.Stringer
Append(anotherTheme Theme)
Append theme to a list of themes
Color(tag string) (string, string)
Return normal and dark theme color constant value with specific tag
ColorTags() []string
Returns the list of all available color constants
Constant(tag string) (string, string)
Return normal and touch theme constant value with specific tag
ConstantTags() []string
Returns the list of all available constants
Image(tag string) (string, string)
Return normal and dark theme image constant value with specific tag
ImageConstantTags() []string
Returns the list of all available image constants
MediaStyle(tag string, params MediaStyleParams) ViewStyle
Returns media style which correspond to provided media style parameters
MediaStyles(tag string) []struct {
Selectors string
Params MediaStyleParams
}
Return all media style settings which correspond to a style tag
Name() string
Return a name of the theme
RemoveStyle(tag string)
Removes style with provided tag
SetColor(tag, color, darkUIColor string)
Sets normal and dark theme color constant value with specific tag
SetConstant(tag string, value, touchUIValue string)
Sets a value for a constant
SetImage(tag, image, darkUIImage string)
Sets normal and dark theme image constant value with specific tag
SetMediaStyle(tag string, params MediaStyleParams, style ViewStyle)
Sets media style with provided media style parameters and a tag
SetStyle(tag string, style ViewStyle)
Sets style for a tag
Style(tag string) ViewStyle
Returns view style by its tag
StyleTags() []string
Returns all tags which describe a style