Documentation
¶
Overview ¶
Package icons gives a gowt app named system icons: SF Symbols on macOS, Segoe Fluent Icons on Windows, freedesktop symbolic icons on Linux, with an embedded Lucide set where the OS has none, so the same names work everywhere. Get returns a *gowt.Image tinted for the current theme; Names lists the valid names and FromSVG makes an image from your own SVG. See https://github.com/haiodo/gowt/blob/main/docs/icons.md.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromSVG ¶
FromSVG returns an image size x size points drawn from the SVG document data at every zoom, with currentColor in c (Lucide, Tabler and other monochrome icons). Images are cached per document, size and colour like Get's: calling FromSVG again with the colour of the new theme makes a new image only for a colour not seen before. The App owns the image like every gowt.Image.
func Get ¶
Get returns the named icon from the system set of the current OS (SF Symbols, Segoe Fluent Icons, freedesktop symbolic icons), or from the embedded Lucide set when the system has none. The result is drawn at every zoom and tinted for the theme at call time: after App.OnThemeChange call Get again (the old image keeps its colour). On macOS an icon without a Color option is also a template image (NSImage isTemplate): AppKit draws it in the label colour in buttons, tool items and menu items (white on a highlight), and a look.SetSidebar Table tints it in the accent colour when its row is selected. Images from FromSVG, App.ImageFromProvider, App.ImageFrom and App.LoadImage are never templates. Images are cached per name, size and colour and owned by the App like every gowt.Image; after a Dispose, Get makes the image again. It panics on an unknown name; Names lists the valid ones.