kit

package
v0.16.5 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: EPL-2.0 Imports: 5 Imported by: 0 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

Overview

Package kit holds the small pieces the look-check apps share: fixed colours, round round avatars, pill badges and coloured dots. It uses only the public gowt facade and icons.

Index

Constants

View Source
const (
	Width  = 1280
	Height = 800
)

The window size every app opens at, so the shots of one app have the same pixels on every OS.

View Source
const (
	SnapWidth  = 1040
	SnapHeight = 600
)

Snap size: with GOWT_SNAP set the window opens at this outer size in points on every OS. It fits the 1728x1044 Windows VM at 150%; the PNG is exactly 2x, so the shots of an app compare.

View Source
const (
	PathInbox   = `` /* 172-byte string literal not displayed */
	PathSend    = `<path d="m22 2-7 20-4-9-9-4z"/><path d="M22 2 11 13"/>`
	PathHash    = `` /* 149-byte string literal not displayed */
	PathClip    = `<path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"/>`
	PathArchive = `<rect width="20" height="5" x="2" y="3" rx="1"/><path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"/><path d="M10 12h4"/>`
	PathMail    = `<rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/>`
	PathChart   = `<path d="M3 3v16a2 2 0 0 0 2 2h16"/><path d="M18 17V9"/><path d="M13 17V5"/><path d="M8 17v-3"/>`
	PathBell    = `<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/><path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/>`
	PathPalette = `` /* 318-byte string literal not displayed */
	PathShield  = `` /* 174-byte string literal not displayed */
	PathWifi    = `` /* 131-byte string literal not displayed */
	PathBug     = `` /* 207-byte string literal not displayed */
)

Paths for a few icons the named set lacks (Lucide-style strokes).

Variables

View Source
var (
	Blue   = gowt.RGB{R: 10, G: 132, B: 255}
	Green  = gowt.RGB{R: 48, G: 176, B: 78}
	Orange = gowt.RGB{R: 245, G: 140, B: 10}
	Red    = gowt.RGB{R: 235, G: 64, B: 52}
	Purple = gowt.RGB{R: 130, G: 80, B: 230}
	Teal   = gowt.RGB{R: 40, G: 170, B: 190}
	Gray   = gowt.RGB{R: 142, G: 142, B: 147}
)

Palette in the order of the macOS system colours; fixed so the shots do not depend on the OS accent.

Functions

func Appearance

func Appearance(app *gowt.App)

Appearance forces the scheme named by GOWT_APPEARANCE ("dark" or "light") for screenshots; unset follows the system. Call it right after SetDensity, before any window.

func Avatar

func Avatar(app *gowt.App, initials string, c gowt.RGB, size int) gowt.Option

Avatar is a round image with initials, size points square.

func Dot

func Dot(app *gowt.App, c gowt.RGB, size int) *gowt.Image

Dot is a coloured circle image size points wide, for table rows and lists.

func Faint

func Faint() gowt.Option

Faint is the secondary text colour.

func Pill

func Pill(text string, w, h int, bg, fg gowt.RGB) gowt.Option

Pill is a rounded badge w x h points; the text is centred. The facade has no badge widget: a pill is a Canvas that draws itself into the size it is given.

func Size

func Size(w *gowt.Window)

Size sets Width x Height, or the snap size when GOWT_SNAP is set. The slack is what a platform's window rect hides (see examples/catalog frameSlack).

func Symbol

func Symbol(app *gowt.App, path string, size int, c gowt.RGB) *gowt.Image

Symbol is a stroked 24x24 path icon, size points wide.

func Tint

func Tint(c gowt.RGB) gowt.RGB

Tint is a light tone of c for a badge background.

Types

This section is empty.

Jump to

Keyboard shortcuts

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