styles

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TabGapDistance = 2
	HeaderPadDist  = 2

	FavChar      = "  ★"
	AutoplayChar = " Auto"
	PlayChar     = "\u2877"
	PauseChar    = "\u28FF"
	LineChar     = "\u2847"
)
View Source
const IndexStringPadAmt = 3
View Source
const MaxFieldLen = 30

Variables

View Source
var Themes = []Theme{
	{
		Name:  "MonoYellow",
		Dark:  ColorProfile{/* contains filtered or unexported fields */},
		Light: ColorProfile{/* contains filtered or unexported fields */},
	},
	{
		Name:  "MonoGreen",
		Dark:  ColorProfile{/* contains filtered or unexported fields */},
		Light: ColorProfile{/* contains filtered or unexported fields */},
	},
	{
		Name:  "MonoBlue",
		Dark:  ColorProfile{/* contains filtered or unexported fields */},
		Light: ColorProfile{/* contains filtered or unexported fields */},
	},
	{
		Name:  "Analog 1",
		Dark:  ColorProfile{/* contains filtered or unexported fields */},
		Light: ColorProfile{/* contains filtered or unexported fields */},
	},
}

Functions

func IndexString

func IndexString(index int) string

func NrInputValidator

func NrInputValidator(s string) error

func PadFieldName

func PadFieldName(v string, padAmt *int) string

Types

type ColorProfile

type ColorProfile struct {
	// contains filtered or unexported fields
}

type Style

type Style struct {
	PrimaryColorStyle   lipgloss.Style
	SecondaryColorStyle lipgloss.Style

	// general
	BaseBold       lipgloss.Style
	DocStyle       lipgloss.Style
	StatusBarStyle lipgloss.Style
	ViewStyle      lipgloss.Style
	NoItemsStyle   lipgloss.Style

	// station delegate
	PrefixStyle                 lipgloss.Style
	NowPlayingPrefixStyle       lipgloss.Style
	SelNowPlayingStyle          lipgloss.Style
	SelNowPlayingDescStyle      lipgloss.Style
	SelItemStyle                lipgloss.Style
	SelDescStyle                lipgloss.Style
	SelectedBorderStyle         lipgloss.Style
	SelectedBorderStyleInactive lipgloss.Style

	// header
	SongTitleStyle lipgloss.Style
	ItalicStyle    lipgloss.Style

	// tabs
	InactiveTabBorder         lipgloss.Style
	InactiveTabInner          lipgloss.Style
	InactiveTabInnerHighlight lipgloss.Style
	ActiveTabBorder           lipgloss.Style
	ActiveTabInner            lipgloss.Style
	ActiveTabInnerHighlight   lipgloss.Style
	TabGap                    lipgloss.Style

	// help
	HelpStyle lipgloss.Style

	// textInput
	PromptStyle    lipgloss.Style
	SelPromptStyle lipgloss.Style

	// station info
	InfoFieldNameStyle lipgloss.Style

	// history
	HistoryDescStyle    lipgloss.Style
	HistorySelItemStyle lipgloss.Style
	HistorySelDescStyle lipgloss.Style
	// contains filtered or unexported fields
}

func NewStyle

func NewStyle(themeIdx int) *Style

func (*Style) GetSecondColor

func (s *Style) GetSecondColor() string

func (*Style) HelpStyles

func (s *Style) HelpStyles() help.Styles

func (*Style) NewInputModel

func (s *Style) NewInputModel(
	prompt, placeholder string,
	prevSugg *key.Binding,
	nextSugg *key.Binding,
	acceptSugg *key.Binding,
	validator textinput.ValidateFunc,
) textinput.Model

func (*Style) SetThemeIdx

func (s *Style) SetThemeIdx(themeIdx int)

func (*Style) TextInputSyle

func (s *Style) TextInputSyle(textInput *textinput.Model, prompt, placeholder string)

type Theme

type Theme struct {
	Name  string
	Dark  ColorProfile
	Light ColorProfile // 5 4 2 1
}

Jump to

Keyboard shortcuts

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