theme

package
v0.0.0-...-4735ca9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2019 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package theme defines how a Fyne app should look when rendered

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackgroundColor

func BackgroundColor() color.Color

BackgroundColor returns the theme's background colour

func ButtonColor

func ButtonColor() color.Color

ButtonColor returns the theme's standard button colour

func CancelIcon

func CancelIcon() fyne.Resource

CancelIcon returns a resource containing the standard cancel icon for the current theme

func CheckButtonCheckedIcon

func CheckButtonCheckedIcon() fyne.Resource

CheckButtonCheckedIcon returns a resource containing the standard checkbox checked icon for the current theme

func CheckButtonIcon

func CheckButtonIcon() fyne.Resource

CheckButtonIcon returns a resource containing the standard checkbox icon for the current theme

func ConfirmIcon

func ConfirmIcon() fyne.Resource

ConfirmIcon returns a resource containing the standard confirm icon for the current theme

func CopyIcon

func CopyIcon() fyne.Resource

CopyIcon returns a resource containing the standard content copy icon for the current theme

func CutIcon

func CutIcon() fyne.Resource

CutIcon returns a resource containing the standard content cut icon for the current theme

func DarkTheme

func DarkTheme() fyne.Theme

DarkTheme defines the built in dark theme colours and sizes

func DefaultTextBoldFont

func DefaultTextBoldFont() fyne.Resource

DefaultTextBoldFont retutns the font path for the built-in bold font style

func DefaultTextBoldItalicFont

func DefaultTextBoldItalicFont() fyne.Resource

DefaultTextBoldItalicFont returns the font path for the built-in bold and italic font style

func DefaultTextFont

func DefaultTextFont() fyne.Resource

DefaultTextFont returns the font path for the built-in regular font style

func DefaultTextItalicFont

func DefaultTextItalicFont() fyne.Resource

DefaultTextItalicFont returns the font path for the built-in italic font style

func DefaultTextMonospaceFont

func DefaultTextMonospaceFont() fyne.Resource

DefaultTextMonospaceFont retutns the font path for the built-in monospace font face

func DeleteIcon

func DeleteIcon() fyne.Resource

DeleteIcon returns a resource containing the standard delete icon for the current theme

func FocusColor

func FocusColor() color.Color

FocusColor returns the colour used to highlight a focussed widget

func FyneLogo() fyne.Resource

FyneLogo returns a resource containing the Fyne logo

func HyperlinkColor

func HyperlinkColor() color.Color

HyperlinkColor returns the theme's standard hyperlink colour

func IconInlineSize

func IconInlineSize() int

IconInlineSize is the standard size of icons which appear within buttons, labels etc.

func InfoIcon

func InfoIcon() fyne.Resource

InfoIcon returns a resource containing the standard dialog info icon for the current theme

func LightTheme

func LightTheme() fyne.Theme

LightTheme defines the built in light theme colours and sizes

func MailComposeIcon

func MailComposeIcon() fyne.Resource

MailComposeIcon returns a resource containing the standard mail compose icon for the current theme

func MailForwardIcon

func MailForwardIcon() fyne.Resource

MailForwardIcon returns a resource containing the standard mail forward icon for the current theme

func MailReplyAllIcon

func MailReplyAllIcon() fyne.Resource

MailReplyAllIcon returns a resource containing the standard mail reply all icon for the current theme

func MailReplyIcon

func MailReplyIcon() fyne.Resource

MailReplyIcon returns a resource containing the standard mail reply icon for the current theme

func NavigateBackIcon() fyne.Resource

NavigateBackIcon returns a resource containing the standard backward navigation icon for the current theme

func NavigateNextIcon() fyne.Resource

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 PasteIcon

func PasteIcon() fyne.Resource

PasteIcon returns a resource containing the standard content paste icon for the current theme

func PlaceHolderColor

func PlaceHolderColor() color.Color

PlaceHolderColor returns the theme's standard text colour

func PrimaryColor

func PrimaryColor() color.Color

PrimaryColor returns the colour used to highlight primary features

func QuestionIcon

func QuestionIcon() fyne.Resource

QuestionIcon returns a resource containing the standard dialog question icon for the current theme

func RadioButtonCheckedIcon

func RadioButtonCheckedIcon() fyne.Resource

RadioButtonCheckedIcon returns a resource containing the standard radio button checked icon for the current theme

func RadioButtonIcon

func RadioButtonIcon() fyne.Resource

RadioButtonIcon returns a resource containing the standard radio button icon for the current theme

func ScrollBarColor

func ScrollBarColor() color.Color

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 TextBoldFont

func TextBoldFont() fyne.Resource

TextBoldFont retutns the font path for the bold font style

func TextBoldItalicFont

func TextBoldItalicFont() fyne.Resource

TextBoldItalicFont returns the font path for the bold and italic font style

func TextColor

func TextColor() color.Color

TextColor returns the theme's standard text colour

func TextFont

func TextFont() fyne.Resource

TextFont returns the font path for the regular font style

func TextItalicFont

func TextItalicFont() fyne.Resource

TextItalicFont returns the font path for the italic font style

func TextMonospaceFont

func TextMonospaceFont() fyne.Resource

TextMonospaceFont retutns the font path for the monospace font face

func TextSize

func TextSize() int

TextSize returns the standard text size

func WarningIcon

func WarningIcon() fyne.Resource

WarningIcon returns a resource containing the standard dialog warning icon for the current theme

Types

type ThemedResource

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

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

func (res *ThemedResource) Content() []byte

Content returns the underlying content of the correct resource for the current theme

func (*ThemedResource) Name

func (res *ThemedResource) Name() string

Name returns the underlrying resource name (used for caching)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL