package theme
import "fyne.io/fyne/theme"
Package theme defines how a Fyne app should look when rendered
Index ¶
- Constants
- func BackgroundColor() color.Color
- func ButtonColor() color.Color
- func CancelIcon() fyne.Resource
- func CheckButtonCheckedIcon() fyne.Resource
- func CheckButtonIcon() fyne.Resource
- func ColorAchromaticIcon() fyne.Resource
- func ColorChromaticIcon() fyne.Resource
- func ColorPaletteIcon() fyne.Resource
- func ComputerIcon() fyne.Resource
- func ConfirmIcon() fyne.Resource
- func ContentAddIcon() fyne.Resource
- func ContentClearIcon() fyne.Resource
- func ContentCopyIcon() fyne.Resource
- func ContentCutIcon() fyne.Resource
- func ContentPasteIcon() fyne.Resource
- func ContentRedoIcon() fyne.Resource
- func ContentRemoveIcon() fyne.Resource
- func ContentUndoIcon() fyne.Resource
- func DarkTheme() fyne.Theme
- func DefaultTextBoldFont() fyne.Resource
- func DefaultTextBoldItalicFont() fyne.Resource
- func DefaultTextFont() fyne.Resource
- func DefaultTextItalicFont() fyne.Resource
- func DefaultTextMonospaceFont() fyne.Resource
- func DeleteIcon() fyne.Resource
- func DisabledButtonColor() color.Color
- func DisabledIconColor() color.Color
- func DisabledTextColor() color.Color
- func DocumentCreateIcon() fyne.Resource
- func DocumentIcon() fyne.Resource
- func DocumentPrintIcon() fyne.Resource
- func DocumentSaveIcon() fyne.Resource
- func DownloadIcon() fyne.Resource
- func ErrorIcon() fyne.Resource
- func FileApplicationIcon() fyne.Resource
- func FileAudioIcon() fyne.Resource
- func FileIcon() fyne.Resource
- func FileImageIcon() fyne.Resource
- func FileTextIcon() fyne.Resource
- func FileVideoIcon() fyne.Resource
- func FocusColor() color.Color
- func FolderIcon() fyne.Resource
- func FolderNewIcon() fyne.Resource
- func FolderOpenIcon() fyne.Resource
- func FyneLogo() fyne.Resource
- func HelpIcon() fyne.Resource
- func HistoryIcon() fyne.Resource
- func HomeIcon() fyne.Resource
- func HoverColor() color.Color
- func HyperlinkColor() color.Color
- func IconColor() color.Color
- func IconInlineSize() int
- func InfoIcon() fyne.Resource
- func LightTheme() fyne.Theme
- func MailAttachmentIcon() fyne.Resource
- func MailComposeIcon() fyne.Resource
- func MailForwardIcon() fyne.Resource
- func MailReplyAllIcon() fyne.Resource
- func MailReplyIcon() fyne.Resource
- func MailSendIcon() fyne.Resource
- func MediaFastForwardIcon() fyne.Resource
- func MediaFastRewindIcon() fyne.Resource
- func MediaPauseIcon() fyne.Resource
- func MediaPlayIcon() fyne.Resource
- func MediaRecordIcon() fyne.Resource
- func MediaReplayIcon() fyne.Resource
- func MediaSkipNextIcon() fyne.Resource
- func MediaSkipPreviousIcon() fyne.Resource
- func MenuDropDownIcon() fyne.Resource
- func MenuDropUpIcon() fyne.Resource
- func MenuExpandIcon() fyne.Resource
- func MenuIcon() fyne.Resource
- func MoveDownIcon() fyne.Resource
- func MoveUpIcon() fyne.Resource
- func NavigateBackIcon() fyne.Resource
- func NavigateNextIcon() fyne.Resource
- func Padding() int
- func PlaceHolderColor() color.Color
- func PrimaryColor() color.Color
- func PrimaryColorNamed(name string) color.Color
- func PrimaryColorNames() []string
- func QuestionIcon() fyne.Resource
- func RadioButtonCheckedIcon() fyne.Resource
- func RadioButtonIcon() fyne.Resource
- func ScrollBarColor() color.Color
- func ScrollBarSize() int
- func ScrollBarSmallSize() int
- func SearchIcon() fyne.Resource
- func SearchReplaceIcon() fyne.Resource
- func SettingsIcon() fyne.Resource
- func ShadowColor() color.Color
- func StorageIcon() fyne.Resource
- func TextBoldFont() fyne.Resource
- func TextBoldItalicFont() fyne.Resource
- func TextColor() color.Color
- func TextFont() fyne.Resource
- func TextItalicFont() fyne.Resource
- func TextMonospaceFont() fyne.Resource
- func TextSize() int
- func ViewFullScreenIcon() fyne.Resource
- func ViewRefreshIcon() fyne.Resource
- func ViewRestoreIcon() fyne.Resource
- func VisibilityIcon() fyne.Resource
- func VisibilityOffIcon() fyne.Resource
- func VolumeDownIcon() fyne.Resource
- func VolumeMuteIcon() fyne.Resource
- func VolumeUpIcon() fyne.Resource
- func WarningIcon() fyne.Resource
- func ZoomFitIcon() fyne.Resource
- func ZoomInIcon() fyne.Resource
- func ZoomOutIcon() fyne.Resource
- type DisabledResource
- func NewDisabledResource(res fyne.Resource) *DisabledResource
- func (res *DisabledResource) Content() []byte
- func (res *DisabledResource) Name() string
- type ErrorThemedResource
- func NewErrorThemedResource(orig fyne.Resource) *ErrorThemedResource
- func (res *ErrorThemedResource) Content() []byte
- func (res *ErrorThemedResource) Name() string
- func (res *ErrorThemedResource) Original() fyne.Resource
- type InvertedThemedResource
- func NewInvertedThemedResource(orig fyne.Resource) *InvertedThemedResource
- func (res *InvertedThemedResource) Content() []byte
- func (res *InvertedThemedResource) Name() string
- func (res *InvertedThemedResource) Original() fyne.Resource
- type PrimaryThemedResource
- func NewPrimaryThemedResource(orig fyne.Resource) *PrimaryThemedResource
- func (res *PrimaryThemedResource) Content() []byte
- func (res *PrimaryThemedResource) Name() string
- func (res *PrimaryThemedResource) Original() fyne.Resource
- type ThemedResource
Constants ¶
const ( // ColorRed is the red primary color name ColorRed = "red" // ColorOrange is the orange primary color name ColorOrange = "orange" // ColorYellow is the yellow primary color name ColorYellow = "yellow" // ColorGreen is the green primary color name ColorGreen = "green" // ColorBlue is the blue primary color name ColorBlue = "blue" // ColorPurple is the purple primary color name ColorPurple = "purple" // ColorBrown is the brown primary color name ColorBrown = "brown" // ColorGray is the gray primary color name ColorGray = "gray" )
Functions ¶
func BackgroundColor ¶
BackgroundColor returns the theme's background color
func ButtonColor ¶
ButtonColor returns the theme's standard button color.
func CancelIcon ¶
CancelIcon returns a resource containing the standard cancel icon for the current theme
func CheckButtonCheckedIcon ¶
CheckButtonCheckedIcon returns a resource containing the standard checkbox checked icon for the current theme
func CheckButtonIcon ¶
CheckButtonIcon returns a resource containing the standard checkbox icon for the current theme
func ColorAchromaticIcon ¶
ColorAchromaticIcon returns a resource containing the standard achromatic color icon for the current theme
func ColorChromaticIcon ¶
ColorChromaticIcon returns a resource containing the standard chromatic color icon for the current theme
func ColorPaletteIcon ¶
ColorPaletteIcon returns a resource containing the standard color palette icon for the current theme
func ComputerIcon ¶
ComputerIcon returns a resource containing the standard computer icon for the current theme
func ConfirmIcon ¶
ConfirmIcon returns a resource containing the standard confirm icon for the current theme
func ContentAddIcon ¶
ContentAddIcon returns a resource containing the standard content add icon for the current theme
func ContentClearIcon ¶
ContentClearIcon returns a resource containing the standard content clear icon for the current theme
func ContentCopyIcon ¶
ContentCopyIcon returns a resource containing the standard content copy icon for the current theme
func ContentCutIcon ¶
ContentCutIcon returns a resource containing the standard content cut icon for the current theme
func ContentPasteIcon ¶
ContentPasteIcon returns a resource containing the standard content paste icon for the current theme
func ContentRedoIcon ¶
ContentRedoIcon returns a resource containing the standard content redo icon for the current theme
func ContentRemoveIcon ¶
ContentRemoveIcon returns a resource containing the standard content remove icon for the current theme
func ContentUndoIcon ¶
ContentUndoIcon returns a resource containing the standard content undo icon for the current theme
func DarkTheme ¶
DarkTheme defines the built in dark theme colors and sizes
func DefaultTextBoldFont ¶
DefaultTextBoldFont returns the font resource for the built-in bold font style
func DefaultTextBoldItalicFont ¶
DefaultTextBoldItalicFont returns the font resource for the built-in bold and italic font style
func DefaultTextFont ¶
DefaultTextFont returns the font resource for the built-in regular font style
func DefaultTextItalicFont ¶
DefaultTextItalicFont returns the font resource for the built-in italic font style
func DefaultTextMonospaceFont ¶
DefaultTextMonospaceFont returns the font resource for the built-in monospace font face
func DeleteIcon ¶
DeleteIcon returns a resource containing the standard delete icon for the current theme
func DisabledButtonColor ¶
DisabledButtonColor returns the theme's disabled button color.
func DisabledIconColor ¶
DisabledIconColor returns the color for a disabledIcon UI element.
Deprecated: Disabled icons match disabled text color for consistency.
func DisabledTextColor ¶
DisabledTextColor returns the color for a disabledIcon UI element
func DocumentCreateIcon ¶
DocumentCreateIcon returns a resource containing the standard document create icon for the current theme
func DocumentIcon ¶
DocumentIcon returns a resource containing the standard document icon for the current theme
func DocumentPrintIcon ¶
DocumentPrintIcon returns a resource containing the standard document print icon for the current theme
func DocumentSaveIcon ¶
DocumentSaveIcon returns a resource containing the standard document save icon for the current theme
func DownloadIcon ¶
DownloadIcon returns a resource containing the standard download icon for the current theme
func ErrorIcon ¶
ErrorIcon returns a resource containing the standard dialog error icon for the current theme
func FileApplicationIcon ¶
FileApplicationIcon returns a resource containing the file icon representing application files for the current theme
func FileAudioIcon ¶
FileAudioIcon returns a resource containing the file icon representing audio files for the current theme
func FileIcon ¶
FileIcon returns a resource containing the appropriate file icon for the current theme
func FileImageIcon ¶
FileImageIcon returns a resource containing the file icon representing image files for the current theme
func FileTextIcon ¶
FileTextIcon returns a resource containing the file icon representing text files for the current theme
func FileVideoIcon ¶
FileVideoIcon returns a resource containing the file icon representing video files for the current theme
func FocusColor ¶
FocusColor returns the color used to highlight a focused widget
func FolderIcon ¶
FolderIcon returns a resource containing the standard folder icon for the current theme
func FolderNewIcon ¶
FolderNewIcon returns a resource containing the standard folder creation icon for the current theme
func FolderOpenIcon ¶
FolderOpenIcon returns a resource containing the standard folder open icon for the current theme
func FyneLogo ¶
FyneLogo returns a resource containing the Fyne logo
func HelpIcon ¶
HelpIcon returns a resource containing the standard help icon for the current theme
func HistoryIcon ¶
HistoryIcon returns a resource containing the standard history icon for the current theme
func HomeIcon ¶
HomeIcon returns a resource containing the standard home folder icon for the current theme
func HoverColor ¶
HoverColor returns the color used to highlight interactive elements currently under a cursor
func HyperlinkColor ¶
HyperlinkColor returns the theme's standard hyperlink color.
Deprecated: Hyperlinks now use the primary color for consistency.
func IconColor ¶
IconColor returns the theme's standard text color.
Deprecated: Icons now use the text colour for consistency.
func IconInlineSize ¶
func IconInlineSize() int
IconInlineSize is the standard size of icons which appear within buttons, labels etc.
func InfoIcon ¶
InfoIcon returns a resource containing the standard dialog info icon for the current theme
func LightTheme ¶
LightTheme defines the built in light theme colors and sizes
func MailAttachmentIcon ¶
MailAttachmentIcon returns a resource containing the standard mail attachment icon for the current theme
func MailComposeIcon ¶
MailComposeIcon returns a resource containing the standard mail compose icon for the current theme
func MailForwardIcon ¶
MailForwardIcon returns a resource containing the standard mail forward icon for the current theme
func MailReplyAllIcon ¶
MailReplyAllIcon returns a resource containing the standard mail reply all icon for the current theme
func MailReplyIcon ¶
MailReplyIcon returns a resource containing the standard mail reply icon for the current theme
func MailSendIcon ¶
MailSendIcon returns a resource containing the standard mail send icon for the current theme
func MediaFastForwardIcon ¶
MediaFastForwardIcon returns a resource containing the standard media fast-forward icon for the current theme
func MediaFastRewindIcon ¶
MediaFastRewindIcon returns a resource containing the standard media fast-rewind icon for the current theme
func MediaPauseIcon ¶
MediaPauseIcon returns a resource containing the standard media pause icon for the current theme
func MediaPlayIcon ¶
MediaPlayIcon returns a resource containing the standard media play icon for the current theme
func MediaRecordIcon ¶
MediaRecordIcon returns a resource containing the standard media record icon for the current theme
func MediaReplayIcon ¶
MediaReplayIcon returns a resource containing the standard media replay icon for the current theme
func MediaSkipNextIcon ¶
MediaSkipNextIcon returns a resource containing the standard media skip next icon for the current theme
func MediaSkipPreviousIcon ¶
MediaSkipPreviousIcon returns a resource containing the standard media skip previous icon for the current theme
func MenuDropDownIcon ¶
MenuDropDownIcon returns a resource containing the standard menu drop down icon for the current theme
func MenuDropUpIcon ¶
MenuDropUpIcon returns a resource containing the standard menu drop up icon for the current theme
func MenuExpandIcon ¶
MenuExpandIcon returns a resource containing the standard (mobile) expand "submenu icon for the current theme
func MenuIcon ¶
MenuIcon returns a resource containing the standard (mobile) menu icon for the current theme
func MoveDownIcon ¶
MoveDownIcon returns a resource containing the standard down arrow icon for the current theme
func MoveUpIcon ¶
MoveUpIcon returns a resource containing the standard up arrow icon for the current theme
func NavigateBackIcon ¶
NavigateBackIcon returns a resource containing the standard backward navigation icon for the current theme
func NavigateNextIcon ¶
NavigateNextIcon returns a resource containing the standard forward navigation icon for the current theme
func Padding ¶
func Padding() int
Padding is the standard gap between elements and the border around interface elements
func PlaceHolderColor ¶
PlaceHolderColor returns the theme's standard text color
func PrimaryColor ¶
PrimaryColor returns the color used to highlight primary features
func PrimaryColorNamed ¶
PrimaryColorNamed returns a theme specific color value for a named primary color.
func PrimaryColorNames ¶
func PrimaryColorNames() []string
PrimaryColorNames returns a list of the standard primary color options.
func QuestionIcon ¶
QuestionIcon returns a resource containing the standard dialog question icon for the current theme
func RadioButtonCheckedIcon ¶
RadioButtonCheckedIcon returns a resource containing the standard radio button checked icon for the current theme
func RadioButtonIcon ¶
RadioButtonIcon returns a resource containing the standard radio button icon for the current theme
func ScrollBarColor ¶
ScrollBarColor returns the color (and translucency) for a scrollBar
func ScrollBarSize ¶
func ScrollBarSize() int
ScrollBarSize is the width (or height) of the bars on a ScrollContainer
func ScrollBarSmallSize ¶
func ScrollBarSmallSize() int
ScrollBarSmallSize is the width (or height) of the minimized bars on a ScrollContainer
func SearchIcon ¶
SearchIcon returns a resource containing the standard search icon for the current theme
func SearchReplaceIcon ¶
SearchReplaceIcon returns a resource containing the standard search and replace icon for the current theme
func SettingsIcon ¶
SettingsIcon returns a resource containing the standard settings icon for the current theme
func ShadowColor ¶
ShadowColor returns the color (and translucency) for shadows used for indicating elevation
func StorageIcon ¶
StorageIcon returns a resource containing the standard storage icon for the current theme
func TextBoldFont ¶
TextBoldFont returns the font resource for the bold font style
func TextBoldItalicFont ¶
TextBoldItalicFont returns the font resource for the bold and italic font style
func TextColor ¶
TextColor returns the theme's standard text color
func TextFont ¶
TextFont returns the font resource for the regular font style
func TextItalicFont ¶
TextItalicFont returns the font resource for the italic font style
func TextMonospaceFont ¶
TextMonospaceFont returns the font resource for the monospace font face
func TextSize ¶
func TextSize() int
TextSize returns the standard text size
func ViewFullScreenIcon ¶
ViewFullScreenIcon returns a resource containing the standard fullscreen icon for the current theme
func ViewRefreshIcon ¶
ViewRefreshIcon returns a resource containing the standard refresh icon for the current theme
func ViewRestoreIcon ¶
ViewRestoreIcon returns a resource containing the standard exit fullscreen icon for the current theme
func VisibilityIcon ¶
VisibilityIcon returns a resource containing the standard visibity icon for the current theme
func VisibilityOffIcon ¶
VisibilityOffIcon returns a resource containing the standard visibity off icon for the current theme
func VolumeDownIcon ¶
VolumeDownIcon returns a resource containing the standard volume down icon for the current theme
func VolumeMuteIcon ¶
VolumeMuteIcon returns a resource containing the standard volume mute icon for the current theme
func VolumeUpIcon ¶
VolumeUpIcon returns a resource containing the standard volume up icon for the current theme
func WarningIcon ¶
WarningIcon returns a resource containing the standard dialog warning icon for the current theme
func ZoomFitIcon ¶
ZoomFitIcon returns a resource containing the standard zoom fit icon for the current theme
func ZoomInIcon ¶
ZoomInIcon returns a resource containing the standard zoom in icon for the current theme
func ZoomOutIcon ¶
ZoomOutIcon returns a resource containing the standard zoom out icon for the current theme
Types ¶
type DisabledResource ¶
type DisabledResource struct {
// contains filtered or unexported fields
}
DisabledResource is a resource wrapper that will return an appropriate resource colorized by the current theme's `DisabledIconColor` color.
func NewDisabledResource ¶
func NewDisabledResource(res fyne.Resource) *DisabledResource
NewDisabledResource creates a resource that adapts to the current theme's DisabledIconColor setting.
func (*DisabledResource) Content ¶
func (res *DisabledResource) Content() []byte
Content returns the disabled style content of the correct resource for the current theme
func (*DisabledResource) Name ¶
func (res *DisabledResource) Name() string
Name returns the resource source name prefixed with `disabled_` (used for caching)
type ErrorThemedResource ¶
type ErrorThemedResource struct {
// contains filtered or unexported fields
}
ErrorThemedResource is a resource wrapper that will return a version of the resource with the main color changed to indicate an error.
func NewErrorThemedResource ¶
func NewErrorThemedResource(orig fyne.Resource) *ErrorThemedResource
NewErrorThemedResource creates a resource that adapts to the error color for the current theme.
func (*ErrorThemedResource) Content ¶
func (res *ErrorThemedResource) Content() []byte
Content returns the underlying content of the resource adapted to the current background color.
func (*ErrorThemedResource) Name ¶
func (res *ErrorThemedResource) Name() string
Name returns the underlying resource name (used for caching).
func (*ErrorThemedResource) Original ¶
func (res *ErrorThemedResource) Original() fyne.Resource
Original returns the underlying resource that this error themed resource was adapted from
type InvertedThemedResource ¶
type InvertedThemedResource struct {
// contains filtered or unexported fields
}
InvertedThemedResource is a resource wrapper that will return a version of the resource with the main color changed for use over highlighted elements.
func NewInvertedThemedResource ¶
func NewInvertedThemedResource(orig fyne.Resource) *InvertedThemedResource
NewInvertedThemedResource creates a resource that adapts to the current theme for use over highlighted elements.
func (*InvertedThemedResource) Content ¶
func (res *InvertedThemedResource) Content() []byte
Content returns the underlying content of the resource adapted to the current background color.
func (*InvertedThemedResource) Name ¶
func (res *InvertedThemedResource) Name() string
Name returns the underlying resource name (used for caching).
func (*InvertedThemedResource) Original ¶
func (res *InvertedThemedResource) Original() fyne.Resource
Original returns the underlying resource that this inverted themed resource was adapted from
type PrimaryThemedResource ¶
type PrimaryThemedResource struct {
// contains filtered or unexported fields
}
PrimaryThemedResource is a resource wrapper that will return a version of the resource with the main color changed to the theme primary color.
func NewPrimaryThemedResource ¶
func NewPrimaryThemedResource(orig fyne.Resource) *PrimaryThemedResource
NewPrimaryThemedResource creates a resource that adapts to the primary color for the current theme.
func (*PrimaryThemedResource) Content ¶
func (res *PrimaryThemedResource) Content() []byte
Content returns the underlying content of the resource adapted to the current background color.
func (*PrimaryThemedResource) Name ¶
func (res *PrimaryThemedResource) Name() string
Name returns the underlying resource name (used for caching).
func (*PrimaryThemedResource) Original ¶
func (res *PrimaryThemedResource) Original() fyne.Resource
Original returns the underlying resource that this primary themed resource was adapted from
type ThemedResource ¶
type ThemedResource struct {
// contains filtered or unexported fields
}
ThemedResource is a resource wrapper that will return a version of the resource with the main color changed for the currently selected theme.
func NewThemedResource ¶
func NewThemedResource(src, ignored fyne.Resource) *ThemedResource
NewThemedResource creates a resource that adapts to the current theme setting.
Deprecated: NewThemedResource() will be replaced with a single parameter version in a future release usage of this method will break, but using the first parameter only will be a trivial change.
func (*ThemedResource) Content ¶
func (res *ThemedResource) Content() []byte
Content returns the underlying content of the resource adapted to the current text color.
func (*ThemedResource) Error ¶
func (res *ThemedResource) Error() *ErrorThemedResource
Error resturns a different resource for indicating an error.
func (*ThemedResource) Name ¶
func (res *ThemedResource) Name() string
Name returns the underlying resource name (used for caching).
Source Files ¶
bundled-fonts.go bundled-icons.go icons.go svg.go theme.go themedtestapp.go
- Version
- v1.4.2
- Published
- Dec 9, 2020
- Platform
- windows/amd64
- Imports
- 12 packages
- Last checked
- 53 seconds ago –
Tools for package owners.