misc

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HexColor added in v0.5.0

func HexColor(v interface{}) color.NRGBA

func IconButton

func IconButton(th *theme.Theme, icon *widget.Icon, button *widget.Clickable, description string) material.IconButtonStyle

func WithAlpha

func WithAlpha(c color.NRGBA, a uint8) color.NRGBA

WithAlpha returns the input color with the new alpha value.

Types

type C

type C = layout.Context

type Color added in v0.5.0

type Color struct {
	color.NRGBA
}

func NewColor added in v0.5.0

func NewColor(value interface{}) Color

construct a Color from hex string, int, or wrapping a NRGBA.

func (Color) Luminance added in v0.5.0

func (c Color) Luminance() float32

Calculate relative luminance of a RGBA color.

type D

type D = layout.Dimensions

func LayoutErrorLabel

func LayoutErrorLabel(gtx C, th *theme.Theme, err error) D

type DividerStyle

type DividerStyle struct {
	Thickness unit.Dp
	Fill      color.NRGBA
	Inset     layout.Inset
	Axis      layout.Axis
}

func Divider

func Divider(axis layout.Axis, thickness unit.Dp) *DividerStyle

func (*DividerStyle) Layout

func (d *DividerStyle) Layout(gtx layout.Context, th *theme.Theme) layout.Dimensions

type Icon

type Icon struct {
	*widget.Icon
	Color color.NRGBA
	Size  unit.Dp
}

func (Icon) Layout

func (i Icon) Layout(gtx C, th *theme.Theme) D

Jump to

Keyboard shortcuts

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