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
- Variables
- func Appearance(app *gowt.App)
- func Avatar(app *gowt.App, initials string, c gowt.RGB, size int) gowt.Option
- func Dot(app *gowt.App, c gowt.RGB, size int) *gowt.Image
- func Faint() gowt.Option
- func Pill(text string, w, h int, bg, fg gowt.RGB) gowt.Option
- func Size(w *gowt.Window)
- func Symbol(app *gowt.App, path string, size int, c gowt.RGB) *gowt.Image
- func Tint(c gowt.RGB) gowt.RGB
Constants ¶
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.
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.
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 ¶
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 ¶
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 Pill ¶
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 ¶
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).
Types ¶
This section is empty.