Instruction file imported from 1mrnewton/cutlass (
.cursor/rules/icons.mdc). Copyright stays with the author.
description: Icon placeholders for the Slint UI — never block on missing art; register it. globs: **/*.slint alwaysApply: false
Icons
The UI is icon-heavy but many controls still ship a text/char placeholder
where a glyph belongs. docs/icons.md is the registry that tracks every one.
When you need an icon that doesn't exist yet
Never block a feature on missing art. Instead:
-
Ship the placeholder. Use a short text/char matching the existing widget pattern —
ToolButton { label: "Split" },HeadToggle { label: "L" },CutlassText { text: "✕" }. Don't invent a new control just for the glyph. -
Register it in
docs/icons.mdunder the right section, one line:- [ ] `lucide-name` — placeholder `"X"` — `path/to/file.slint` — what it does.[ ]= needed ·[x]= fetched + wired. Always include the placeholder string and the file so it's trivial to find and replace. Prefer a Lucide name (Tabler forletter-spacing/line-height). -
Mention in your summary that the icon was registered, not drawn.
When you wire a real icon in
- Load via
@image-url(...)relative to the.slintfile and tint withcolorize:so one SVG serves all themes. - Put the SVG in repo-root
assets/icon/(orassets/icon/library/). Media scratch lives in gitignoredlocal-assets/— seedocs/icons.md. - Flip the registry entry to
[x].
Don't silently leave a bare letter/word as if it were final, and don't fetch or generate binary icon art unless asked — register it and move on.