widget

package
v0.0.0-...-ff15c3c Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrimaryLight byte = iota
	PrimaryDark
	PrimaryDefault

	SecondaryLight
	SecondaryDark
	SecondaryDefault

	Default

	Accent

	Error
)

Variables

This section is empty.

Functions

func LayoutTheme

func LayoutTheme(widget ThemedWidget, theme *material.Theme) layout.Widget

Types

type Background

type Background struct {
	Color  color.NRGBA
	Radius unit.Value
	Inset  layout.Inset
}

func (*Background) Layout

type ClipCircle

type ClipCircle struct {
}

func (ClipCircle) Layout

type ContrastPair

type ContrastPair struct {
	Fg, Bg color.NRGBA
}

type Fill

type Fill struct {
	Color color.NRGBA
}

func (Fill) Layout

func (f Fill) Layout(gtx layout.Context) layout.Dimensions

type InitialSign

type InitialSign struct {
	Theme   *material.Theme
	Initial string
}

InitialSign is a widget which shows a Initial on a colored background

func (InitialSign) Layout

func (w InitialSign) Layout(gtx layout.Context) layout.Dimensions

type ListElement

type ListElement struct {
	Before    layout.Widget
	Lines     [2]string
	AfterText string
	Click     *widget.Clickable
}

func (ListElement) Layout

func (w ListElement) Layout(gtx g, th *material.Theme) d

type Message

type Message struct {
	Time   time.Time
	Text   string
	Sender string
}

func (Message) Layout

func (m Message) Layout(gtx g, th *material.Theme) d

type RoundImage

type RoundImage struct {
	Image image.Image
}

func (RoundImage) Layout

func (w RoundImage) Layout(gtx layout.Context) layout.Dimensions

type StatusMessage

type StatusMessage struct {
	Text string
}

func (StatusMessage) Layout

func (m StatusMessage) Layout(gtx g, th *material.Theme) d

type Theme

type Theme struct {
	Colors [9]ContrastPair
	// contains filtered or unexported fields
}

func NewDarkTheme

func NewDarkTheme() Theme

func NewTheme

func NewTheme() Theme

func (Theme) With

func (th Theme) With(normal, contrast byte) *material.Theme

func (Theme) WithContrast

func (th Theme) WithContrast(c byte) *material.Theme

type ThemedWidget

type ThemedWidget func(gtx layout.Context, theme *material.Theme) layout.Dimensions

Jump to

Keyboard shortcuts

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