theme

package
v0.0.7-gamma Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorNameStyle added in v0.0.6

type AuthorNameStyle struct {
	*forest.Identity
	*material.Theme
}

func AuthorName added in v0.0.6

func AuthorName(theme *material.Theme, identity *forest.Identity) AuthorNameStyle

func (AuthorNameStyle) Layout added in v0.0.6

type C added in v0.0.6

type C = layout.Context

type Colors added in v0.0.7

type Colors struct {
	Default, Light, Dark color.RGBA
}

type CommunityNameStyle added in v0.0.6

type CommunityNameStyle struct {
	*forest.Community
	Prefix string
	*material.Theme
}

func CommunityName added in v0.0.6

func CommunityName(theme *material.Theme, community *forest.Community) CommunityNameStyle

func (CommunityNameStyle) Layout added in v0.0.6

type D added in v0.0.6

type D = layout.Dimensions

func DrawRect added in v0.0.7

func DrawRect(gtx C, background color.RGBA, size f32.Point, radii float32) D

DrawRect creates a rectangle of the provided background color with Dimensions specified by size and a corner radius (on all corners) specified by radii.

type ReplyStyle

type ReplyStyle struct {
	*material.Theme
	Background color.RGBA
	TextColor  color.RGBA

	// CollapseMetadata should be set to true if this reply can be rendered
	// without the author being displayed.
	CollapseMetadata bool
}

func Reply

func Reply(th *material.Theme) ReplyStyle

func (ReplyStyle) Layout

func (r ReplyStyle) Layout(gtx layout.Context, reply *forest.Reply, author *forest.Identity, community *forest.Community) layout.Dimensions

type Theme added in v0.0.7

type Theme struct {
	*material.Theme
	Primary    Colors
	Secondary  Colors
	Background Colors

	Ancestors, Descendants, Selected, Siblings, Unselected *color.RGBA
}

func New added in v0.0.7

func New() *Theme

Jump to

Keyboard shortcuts

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