widgets

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCard

func NewCard(gtx layout.Context, c Card, widget func(gtx layout.Context) layout.Dimensions) layout.Dimensions

func NewCircle

func NewCircle(gtx layout.Context, circle Circle) layout.Dimensions

func NewDivider

func NewDivider(gtx layout.Context, height int, color color.NRGBA) layout.Dimensions

func NewImage

func NewImage(gtx layout.Context, name string, position layout.Direction, scale float32) layout.Dimensions

func NewLabel

func NewLabel(gtx layout.Context, theme *material.Theme, text string,
	size int, color color.NRGBA, alignment txt.Alignment, weight font.Weight) layout.Dimensions
func NewLink(gtx layout.Context, obj Link) layout.Dimensions

func NewMainTitle

func NewMainTitle(gtx layout.Context, theme *material.Theme, text string) layout.Dimensions

func NewSmallText

func NewSmallText(gtx layout.Context, theme *material.Theme, text string) layout.Dimensions

func NewSubText

func NewSubText(gtx layout.Context, theme *material.Theme, text string, alignment txt.Alignment) layout.Dimensions

func NewText

func NewText(gtx layout.Context, theme *material.Theme, text string, alignment txt.Alignment) layout.Dimensions

func NewTitle

func NewTitle(gtx layout.Context, theme *material.Theme, text string) layout.Dimensions

Types

type Card

type Card struct {
	Width       int
	Height      int
	Radius      int
	StrokeWidth int
	StrokeColor color.NRGBA
	Color       color.NRGBA
}

type Circle

type Circle struct {
	Diameter    int
	StrokeWidth int
	Color       color.NRGBA
	StrokeColor color.NRGBA
}
type Link struct {
	Button *widget.Clickable
	Theme  *material.Theme
	Text   string
	Url    string
}

Jump to

Keyboard shortcuts

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