theme

package
v2.6.0-beta1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ColorBlue   = "blue"
	ColorBrown  = "brown"
	ColorGray   = "gray"
	ColorGreen  = "green"
	ColorOrange = "orange"
	ColorPurple = "purple"
	ColorRed    = "red"
	ColorYellow = "yellow"
)

Primary color names.

View Source
const (
	VariantDark fyne.ThemeVariant = iota
	VariantLight
	VariantNameUserPreference // locally used in builtinTheme for backward compatibility
)

Theme variants; the public available ones are defined in /theme/theme.go.

View Source
const FeatureNameDeviceIsMobile = FeatureName("deviceIsMobile")

Variables

This section is empty.

Functions

func FeatureForWidget

func FeatureForWidget(name FeatureName, w fyne.Widget) any

FeatureForWidget looks up the specified feature flag for the requested widget using the current theme. This is for internal purposes and will do nothing if the theme has not been overridden with the ThemeOverride container.

func ForegroundOnPrimaryColorNamed

func ForegroundOnPrimaryColorNamed(name string) color.Color

ForegroundOnPrimaryColorNamed returns a theme specific color used for text and icons against the named primary color.

func PrimaryColorNamed

func PrimaryColorNamed(name string) color.Color

PrimaryColorNamed returns a theme specific color value for a named primary color.

Types

type FeatureName

type FeatureName string

type FeatureTheme

type FeatureTheme interface {
	Feature(FeatureName) any
}

FeatureTheme defines the method to look up features that we use internally to apply functional differences through a theme override.

Jump to

Keyboard shortcuts

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