Documentation ¶
Overview ¶
Package theme defines how a Fyne app should look when rendered
Index ¶
- func BackgroundColor() color.Color
- func ButtonColor() color.Color
- func CancelIcon() fyne.Resource
- func CheckButtonCheckedIcon() fyne.Resource
- func CheckButtonIcon() 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 DocumentCreateIcon() fyne.Resource
- func DocumentPrintIcon() fyne.Resource
- func DocumentSaveIcon() 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 HomeIcon() fyne.Resource
- func HyperlinkColor() 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 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 QuestionIcon() fyne.Resource
- func RadioButtonCheckedIcon() fyne.Resource
- func RadioButtonIcon() fyne.Resource
- func ScrollBarColor() color.Color
- func ScrollBarSize() int
- func SearchIcon() fyne.Resource
- func SearchReplaceIcon() 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 WarningIcon() fyne.Resource
- func ZoomFitIcon() fyne.Resource
- func ZoomInIcon() fyne.Resource
- func ZoomOutIcon() fyne.Resource
- type ThemedResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackgroundColor ¶ added in v1.0.0
BackgroundColor returns the theme's background colour
func ButtonColor ¶ added in v1.0.0
ButtonColor returns the theme's standard button colour
func CancelIcon ¶ added in v1.0.0
CancelIcon returns a resource containing the standard cancel icon for the current theme
func CheckButtonCheckedIcon ¶ added in v1.0.0
CheckButtonCheckedIcon returns a resource containing the standard checkbox checked icon for the current theme
func CheckButtonIcon ¶ added in v1.0.0
CheckButtonIcon returns a resource containing the standard checkbox icon for the current theme
func ConfirmIcon ¶ added in v1.0.0
ConfirmIcon returns a resource containing the standard confirm icon for the current theme
func ContentAddIcon ¶ added in v1.0.0
ContentAddIcon returns a resource containing the standard content add icon for the current theme
func ContentClearIcon ¶ added in v1.0.0
ContentClearIcon returns a resource containing the standard content clear icon for the current theme
func ContentCopyIcon ¶ added in v1.0.0
ContentCopyIcon returns a resource containing the standard content copy icon for the current theme
func ContentCutIcon ¶ added in v1.0.0
ContentCutIcon returns a resource containing the standard content cut icon for the current theme
func ContentPasteIcon ¶ added in v1.0.0
ContentPasteIcon returns a resource containing the standard content paste icon for the current theme
func ContentRedoIcon ¶ added in v1.0.0
ContentRedoIcon returns a resource containing the standard content redo icon for the current theme
func ContentRemoveIcon ¶ added in v1.0.0
ContentRemoveIcon returns a resource containing the standard content remove icon for the current theme
func ContentUndoIcon ¶ added in v1.0.0
ContentUndoIcon returns a resource containing the standard content undo icon for the current theme
func DefaultTextBoldFont ¶ added in v1.0.0
DefaultTextBoldFont retutns the font path for the built-in bold font style
func DefaultTextBoldItalicFont ¶ added in v1.0.0
DefaultTextBoldItalicFont returns the font path for the built-in bold and italic font style
func DefaultTextFont ¶ added in v1.0.0
DefaultTextFont returns the font path for the built-in regular font style
func DefaultTextItalicFont ¶ added in v1.0.0
DefaultTextItalicFont returns the font path for the built-in italic font style
func DefaultTextMonospaceFont ¶ added in v1.0.0
DefaultTextMonospaceFont retutns the font path for the built-in monospace font face
func DeleteIcon ¶ added in v1.0.0
DeleteIcon returns a resource containing the standard delete icon for the current theme
func DocumentCreateIcon ¶ added in v1.0.0
DocumentCreateIcon returns a resource containing the standard document create icon for the current theme
func DocumentPrintIcon ¶ added in v1.0.0
DocumentPrintIcon returns a resource containing the standard document print icon for the current theme
func DocumentSaveIcon ¶ added in v1.0.0
DocumentSaveIcon returns a resource containing the standard document save icon for the current theme
func FocusColor ¶ added in v1.0.0
FocusColor returns the colour used to highlight a focussed widget
func FolderIcon ¶ added in v1.0.0
FolderIcon returns a resource containing the standard folder icon for the current theme
func FolderNewIcon ¶ added in v1.0.0
FolderNewIcon returns a resource containing the standard folder creation icon for the current theme
func FolderOpenIcon ¶ added in v1.0.0
FolderOpenIcon returns a resource containing the standard folder open icon for the current theme
func HelpIcon ¶ added in v1.0.0
HelpIcon returns a resource containing the standard help icon for the current theme
func HomeIcon ¶ added in v1.0.0
HomeIcon returns a resource containing the standard home folder icon for the current theme
func HyperlinkColor ¶ added in v1.0.0
HyperlinkColor returns the theme's standard hyperlink colour
func IconInlineSize ¶ added in v1.0.0
func IconInlineSize() int
IconInlineSize is the standard size of icons which appear within buttons, labels etc.
func InfoIcon ¶ added in v1.0.0
InfoIcon returns a resource containing the standard dialog info icon for the current theme
func LightTheme ¶ added in v1.0.0
LightTheme defines the built in light theme colours and sizes
func MailAttachmentIcon ¶ added in v1.0.0
MailAttachmentIcon returns a resource containing the standard mail attachment icon for the current theme
func MailComposeIcon ¶ added in v1.0.0
MailComposeIcon returns a resource containing the standard mail compose icon for the current theme
func MailForwardIcon ¶ added in v1.0.0
MailForwardIcon returns a resource containing the standard mail forward icon for the current theme
func MailReplyAllIcon ¶ added in v1.0.0
MailReplyAllIcon returns a resource containing the standard mail reply all icon for the current theme
func MailReplyIcon ¶ added in v1.0.0
MailReplyIcon returns a resource containing the standard mail reply icon for the current theme
func MailSendIcon ¶ added in v1.0.0
MailSendIcon returns a resource containing the standard mail send icon for the current theme
func MoveDownIcon ¶ added in v1.0.0
MoveDownIcon returns a resource containing the standard down arrow icon for the current theme
func MoveUpIcon ¶ added in v1.0.0
MoveUpIcon returns a resource containing the standard up arrow icon for the current theme
func NavigateBackIcon ¶ added in v1.0.0
NavigateBackIcon returns a resource containing the standard backward navigation icon for the current theme
func NavigateNextIcon ¶ added in v1.0.0
NavigateNextIcon returns a resource containing the standard forward navigation icon for the current theme
func Padding ¶ added in v1.0.0
func Padding() int
Padding is the standard gap between elements and the border around interface elements
func PlaceHolderColor ¶ added in v1.0.0
PlaceHolderColor returns the theme's standard text colour
func PrimaryColor ¶ added in v1.0.0
PrimaryColor returns the colour used to highlight primary features
func QuestionIcon ¶ added in v1.0.0
QuestionIcon returns a resource containing the standard dialog question icon for the current theme
func RadioButtonCheckedIcon ¶ added in v1.0.0
RadioButtonCheckedIcon returns a resource containing the standard radio button checked icon for the current theme
func RadioButtonIcon ¶ added in v1.0.0
RadioButtonIcon returns a resource containing the standard radio button icon for the current theme
func ScrollBarColor ¶ added in v1.0.0
ScrollBarColor returns the color (and translucency) for a scrollBar
func ScrollBarSize ¶ added in v1.0.0
func ScrollBarSize() int
ScrollBarSize is the width (or height) of the bars on a ScrollContainer
func SearchIcon ¶ added in v1.0.0
SearchIcon returns a resource containing the standard search icon for the current theme
func SearchReplaceIcon ¶ added in v1.0.0
SearchReplaceIcon returns a resource containing the standard search and replace icon for the current theme
func TextBoldFont ¶ added in v1.0.0
TextBoldFont retutns the font path for the bold font style
func TextBoldItalicFont ¶ added in v1.0.0
TextBoldItalicFont returns the font path for the bold and italic font style
func TextItalicFont ¶ added in v1.0.0
TextItalicFont returns the font path for the italic font style
func TextMonospaceFont ¶ added in v1.0.0
TextMonospaceFont retutns the font path for the monospace font face
func ViewFullScreenIcon ¶ added in v1.0.0
ViewFullScreenIcon returns a resource containing the standard fullscreen icon for the current theme
func ViewRefreshIcon ¶ added in v1.0.0
ViewRefreshIcon returns a resource containing the standard refresh icon for the current theme
func ViewRestoreIcon ¶ added in v1.0.0
ViewRestoreIcon returns a resource containing the standard exit fullscreen icon for the current theme
func WarningIcon ¶ added in v1.0.0
WarningIcon returns a resource containing the standard dialog warning icon for the current theme
func ZoomFitIcon ¶ added in v1.0.0
ZoomFitIcon returns a resource containing the standard zoom fit icon for the current theme
func ZoomInIcon ¶ added in v1.0.0
ZoomInIcon returns a resource containing the standard zoom in icon for the current theme
func ZoomOutIcon ¶ added in v1.0.0
ZoomOutIcon returns a resource containing the standard zoom out icon for the current theme
Types ¶
type ThemedResource ¶ added in v1.0.0
type ThemedResource struct {
// contains filtered or unexported fields
}
ThemedResource is a resource wrapper that will return an appropriate resource for the currently selected theme. In this implementation it chooses between a dark and light alternative to match the current setting.
func NewThemedResource ¶ added in v1.0.0
func NewThemedResource(dark, light fyne.Resource) *ThemedResource
NewThemedResource creates a resource that adapts to the current theme setting. It is currently a simple pairing of a dark and light variant of the same resource.
func (*ThemedResource) Content ¶ added in v1.0.0
func (res *ThemedResource) Content() []byte
Content returns the underlying content of the correct resource for the current theme
func (*ThemedResource) Name ¶ added in v1.0.0
func (res *ThemedResource) Name() string
Name returns the underlrying resource name (used for caching)