theme

package
v0.0.8-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 13 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 ReplyStatus added in v0.0.8

type ReplyStatus int
const (
	None ReplyStatus = iota
	Sibling
	Selected
	Ancestor
	Descendant
)

type ReplyStyle

type ReplyStyle struct {
	*Theme
	Highlight  color.RGBA
	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
	// contains filtered or unexported fields
}

func Reply

func Reply(th *Theme, status ReplyStatus) 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