material

package
v0.0.0-...-311e29d Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type C

type C = layout.Context

type D

type D = layout.Dimensions

type IconType

type IconType int
const (
	IconNone IconType = iota
	IconLeader
	IconTop
)

type Tabbar

type Tabbar struct {

	// Currently ignored: All tabbars are scrollable.
	//
	// Mostly because I don't know how to make them not scrollable.
	Scrollable bool

	ClusteredFixed bool
	Alignment      layout.Alignment // only for ClusteredFixed
	Color          struct {
		// Active: use Theme.Color.Text
		// Container: use Theme.Color.Primary
		Active    color.NRGBA
		Inactive  color.NRGBA
		Container color.NRGBA
		Divider   color.NRGBA
	}
	Font      font.Font
	IconType  IconType
	Buttons   layout.List
	CloseIcon *widget.Icon
	// contains filtered or unexported fields
}

See https://material.io/components/tabs

func NewTabbar

func NewTabbar(th *material.Theme) *Tabbar

Tabbar creates a new tab bar. You should store it and reuse it for each layout, because the embedded layout.List has some state you need to keep around.

func (*Tabbar) Layout

func (tb *Tabbar) Layout(gtx C, wtb *hrw.Tabbar) D

Jump to

Keyboard shortcuts

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