theme

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAlphaPalette = AlphaPalette{
	Hover:    48,
	Selected: 96,
}

Functions

func LoadBuiltin

func LoadBuiltin(fontDir string) []font.FontFace

LoadBuiltin loads builtin fonts from a provided dir and the Gio builtin Go font collection.

Types

type AlphaPalette

type AlphaPalette struct {
	Hover, Selected uint8
}

AlphaPalette is the set of alpha values to be applied for certain material design states like hover, selected, etc...

type EditorStyle

type EditorStyle struct {
	// typeface for editing
	TypeFace        font.Typeface
	TextSize        unit.Sp
	Weight          font.Weight
	LineHeight      unit.Sp
	LineHeightScale float32
	//May be helpful for code syntax highlighting.
	ColorScheme string
}

type Theme

type Theme struct {
	*material.Theme
	AlphaPalette
	Editor      EditorStyle
	NaviBgColor color.NRGBA
}

func NewTheme

func NewTheme(fontDir string, noSystemFonts bool) *Theme

NewTheme instantiates a theme, extending material theme.

func (*Theme) SetEditorStyle

func (th *Theme) SetEditorStyle(style EditorStyle)

Jump to

Keyboard shortcuts

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