Skip to main content

Module icons

Module icons 

Expand description

Lucide-icon glyphs, stroked to match the concept’s 1.5 px aesthetic.

Each Icon variant resolves to one or more BezPath subpaths traced from upstream lucide-react (v0.546.0, ISC licensed) in the lucide 24×24 viewBox, scaled at draw time. Icons are stroked, not filled — draw_icon mirrors that. Deliberately just a data table + one draw function — no trait hierarchy, icon-theme system, or per-icon caching.

To add an icon: pull the __iconNode entries from tilo-concept/node_modules/lucide-react/dist/esm/icons/<kebab>.js, add a variant to Icon, and map it in icon_subpaths.

Structs§

AppImage
A shareable handle to an application’s artwork.

Enums§

Icon
Stable identifier for a lucide glyph. New entries map 1:1 to lucide icon kebab names (e.g. Icon::LayoutGrid → layout-grid).

Constants§

LUCIDE_DEFAULT_STROKE_PX
Lucide’s default stroke width (in viewBox units) — 2.0 maps to 1.5 px after the concept’s Tailwind tweaks, so we scale by 0.75 when translating viewBox stroke width to output pixels. Call sites can still override via the stroke_px argument of draw_icon.
LUCIDE_VIEWBOX
Lucide’s fixed viewBox. Every stored path assumes this coordinate system; draw_icon scales to the requested rect.
MAX_DEVICE_PX
The largest edge chrome asks a source to rasterise.

Traits§

AppImageSource
Where an AppImage’s pixels come from.

Functions§

device_px
The device-pixel edge rect covers under transform.
draw_app_image
Paint image filling rect, rasterised for the device size rect covers. Returns false, painting nothing, when the source has no pixels, so the caller can fall back to a glyph.
draw_icon
Paint icon stroked in color into scene, centred within rect. The icon is scaled from rect.size().min() / LUCIDE_VIEWBOX so it always fits the shorter dimension, padding the longer axis.
draw_icon_layered
draw_icon with a per-subpath colour. Exists for glyphs whose subpaths mean different things — the Wi-Fi arcs are a scale, not a picture, so a two-bar signal should paint two arcs lit and two dim rather than the whole glyph at one alpha (drawing four nested icons at four sizes would not line up; they must come from one path table).
icon_for_path
Map a filesystem entry to the most appropriate Icon. Directories always resolve to Icon::Folder; files are classified by (lower-cased) extension, falling back to Icon::File.