style

package
v0.0.0-...-20a9d7b Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 1 Imported by: 4

Documentation

Overview

Package style provides style definitions for UI components.

Package style provides style definitions for UI components.

Index

Constants

View Source
const (
	BorderNone   BorderStyle = ""
	BorderSolid  BorderStyle = "solid"
	BorderRaised             = "raised"
	BorderSunken             = "sunken"
)

Styles for a widget border.

Variables

View Source
var (
	DefaultWindow = Window{
		ActiveTitleBackground:   render.Blue,
		ActiveTitleForeground:   render.White,
		InactiveTitleBackground: render.DarkGrey,
		InactiveTitleForeground: render.Grey,
		ActiveBackground:        render.Grey,
		InactiveBackground:      render.Grey,
	}

	DefaultLabel = Label{
		Background: render.Invisible,
		Foreground: render.Black,
	}

	DefaultButton = Button{
		Background:      render.RGBA(200, 200, 200, 255),
		Foreground:      render.Black,
		OutlineColor:    render.Black,
		OutlineSize:     1,
		HoverBackground: render.RGBA(200, 255, 255, 255),
		HoverForeground: render.Black,
		BorderStyle:     BorderRaised,
		BorderSize:      2,
	}

	DefaultListBox = ListBox{
		Background:         render.White,
		Foreground:         render.Black,
		HoverBackground:    render.Cyan,
		HoverForeground:    render.Orange,
		SelectedBackground: render.Blue,
		SelectedForeground: render.White,
		BorderStyle:        BorderSunken,

		BorderSize: 2,
	}

	DefaultTooltip = Tooltip{
		Background: render.RGBA(0, 0, 0, 230),
		Foreground: render.White,
	}
)

Default styles for widgets without a theme.

Functions

This section is empty.

Types

type BorderStyle

type BorderStyle string

BorderStyle options for widget.SetBorderStyle()

type Button

type Button struct {
	Background      render.Color
	Foreground      render.Color // Labels only
	OutlineColor    render.Color
	OutlineSize     int
	HoverBackground render.Color
	HoverForeground render.Color
	BorderStyle     BorderStyle
	BorderSize      int
}

Button style configuration.

type Label

type Label struct {
	Background render.Color
	Foreground render.Color
}

Label style configuration.

type ListBox

type ListBox struct {
	Background         render.Color
	Foreground         render.Color // Labels only
	SelectedBackground render.Color
	SelectedForeground render.Color
	HoverBackground    render.Color
	HoverForeground    render.Color
	BorderStyle        BorderStyle
	BorderSize         int
}

ListBox style configuration.

type Tooltip

type Tooltip struct {
	Background render.Color
	Foreground render.Color
}

Tooltip style configuration.

type Window

type Window struct {
	ActiveTitleBackground   render.Color
	ActiveTitleForeground   render.Color
	ActiveBackground        render.Color
	InactiveTitleBackground render.Color
	InactiveTitleForeground render.Color
	InactiveBackground      render.Color
}

Window style configuration.

Jump to

Keyboard shortcuts

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