package theme

import "fyne.io/fyne/v2/internal/theme"

Index

Constants

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

Primary color names.

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.

const FeatureNameDeviceIsMobile = FeatureName("deviceIsMobile")

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.

Source Files

feature.go theme.go

Version
v2.6.0 (latest)
Published
Apr 10, 2025
Platform
js/wasm
Imports
3 packages
Last checked
2 minutes ago

Tools for package owners.