Skip to content

UI icons: redraw the weakest, one icon per tool and mask kind (Lucide, ISC) - #1104

Open
mattsivak wants to merge 5 commits into
storytold:mainfrom
mattsivak:worktree-icon-overhaul
Open

mattsivak wants to merge 5 commits into
storytold:mainfrom
mattsivak:worktree-icon-overhaul

Conversation

@mattsivak

Copy link
Copy Markdown
Contributor

What

A pass over the in-app icon set (crates/ui-egui/src/icons.rs): the weakest icons are redrawn, every tool and mask kind gets its own icon, and the icon code gets a small SVG-path reader so icons can have real curves.

Worst icons, fixed:

  1. Filled rating star: dark anti-aliasing seams through every filled star. Now one mesh plus an outline.
  2. Picker (eyedropper): read as a hammer.
  3. Gear: rays, not teeth, so it read as Sun / GradeHighlights.
  4. Activity: identical to Clock. Now a history clock.
  5. Mask: a dotted golf ball. Linear: a barcode. Now an original family with Radial (dashed and solid guide shapes).
  6. Cloud / Sky: lumpy, broken outlines. Brush, Filmstrip (read as a credit card), Reject flag (unreadable X).
  7. Crop (stray arrow), Eye / EyeOff, Bell, Presets (two meaningless circles), Versions.

One icon per meaning:

  • New icons: RedEye (it used the "visible" eye) and Palette (Color Mixer used Radial).
  • Mask kinds that all shared one person icon now have their own: Object, Describe, Background, People, Landscape, Luminance, Depth. The People view uses People too.
  • Color Grading uses GradeAll instead of Presets.

Code:

  • lucide! strokes SVG path data, parsed once per icon and cached in a static.
  • Curves are flattened by epaint's Bézier shapes. The path reader never panics on malformed input (fixed junk plus 2,000 random strings in tests).
  • Pen::line rounds line ends (opaque colours, strokes of at least 2 px), so hand-drawn and Lucide icons match.
  • Icon and Icon::ALL come from one macro list, so a new icon can't be missed by the tests.
  • masking.rs has one kind_icon table for the mask tiles and the mask list.
  • The 8 unused icons are removed.
  • icon_contact_sheet (an ignored test) renders every icon, labelled, to a PNG for review:
    ICON_SHEET=out.png cargo test -p lightcraft-ui-egui --lib icon_contact_sheet -- --ignored

Licence

Path data for 23 icons is adapted from Lucide (lucide-static 0.460.0, ISC), each arm commented with its Lucide name. The licence text is in assets/licenses/ISC-Lucide.txt, the full notice is in NOTICE (which ships with every release), and assets/ATTRIBUTION.md has a row for it. No Adobe material.

The assets section of CLAUDE.md still says the icons in icons.rs are original work; that wording may want updating.

Build fixes on main (separate commit, 4b1c5b4e)

Current main does not build here:

  • apps/lightcraft/src/main.rs:67 calls eframe::App::on_exit(self), but with eframe's glow feature it takes an Option<&glow::Context>. Passing None is safe: the app's on_exit ignores it.
  • clippy 1.99's new chunks_exact_to_as_chunks lint fails crates/pipeline/src/spots.rs:250; it now uses as_chunks::<3>().

Testing

  • cargo xtask ci: fmt, clippy, parity, layers, assets and wasm pass.
  • The test step fails in two places, both identical on main without this branch:
    • catalog::tests_lock::dropping_the_lock_frees_the_library_while_another_thread_spawns_processes: the test machine's sandbox blocks spawning /bin/true.
    • ui-egui::tests_dialog_fit::export_dialog_is_unchanged_in_a_tall_window: the dialog measures 876 pt where the test expects 846.
  • Some lightcraft-engine sidecar and Lightroom-folder tests also fail on that machine with filesystem errors (EILSEQ for non-UTF-8 names). That crate doesn't depend on the UI code changed here.
  • lightcraft-ui-egui: 747 tests pass, including the new icon tests (parser, junk input, every icon draws, arrowhead symmetry). The app, CLI, MCP and pipeline suites all pass.
  • Checked by eye: contact sheets before and after, and headless app snapshots of the Masking and Edit panels.

@mattsivak

mattsivak commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Icons: before and after

Contact sheets from icon_contact_sheet: every icon at 48 pt and 16 pt, light on dark, rendered at 2×. Each sheet lists that version's whole icon set in enum order, so positions don't line up between them.

Before (4b1c5b4e, the PR base: 78 icons)

Icons before

After (1cf9fbe6, this PR: 79 icons)

Icons after

Redrawn: StarFilled, Picker, Gear, Activity, Mask, Linear, Radial, Cloud, Sky, Brush, Filmstrip, FlagPick/FlagReject, Crop, Eye/EyeOff, Bell, Presets, Versions, Eraser.
New: RedEye, Palette, Object, Describe, Background, People, Landscape, Luminance, Depth.
Removed (unused): Minus, Rotate, Flip, Invert, Dots, Video, Heart, Edited.

To regenerate the after sheet: ICON_SHEET=out.png cargo test -p lightcraft-ui-egui --lib icon_contact_sheet -- --ignored

@mattsivak
mattsivak marked this pull request as draft October 11, 2026 20:03
emmertex added a commit to emmertex/chromaforge that referenced this pull request Oct 12, 2026
…Lucide, ISC)

Port of upstream PR #1104 (mattsivak): Lucide paths parsed once and cached, round line ends,
one mask-kind icon table, RedEye / Palette and per-kind mask icons, the redrawn star, picker,
gear, activity, mask, linear, cloud, brush, filmstrip, reject flag, crop, eye, bell, presets
and versions. Fork changes: dac_* names, brand-neutral NOTICE line, and the fork-only grid
badge for rotated photos uses RotateDrag (#1104 drops the old Rotate icon).

UPSTREAM-PR: storytold/lightcraft#1104

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
emmertex referenced this pull request in emmertex/chromaforge Oct 12, 2026
…and the mask actions (#972)

Port of upstream PR #1164 (stacked on #1104). Crop: chain-link aspect lock, one row of rotate /
flip / swap / reset icons, ruler (Straighten Tool), wand (Auto), overlay choices as icon segments
drawn from the crop guides. Masks: add / subtract / intersect / invert and +/- as icons. Upright
modes stay text. Every icon keeps its `button:<id>`, command and accessible name; hover shows the
label plus the command's current shortcut (`icon_button_named`, `command_tooltip`,
`icon_segmented`). Two new strings in all nine catalogs. Fork changes: dac_* / DacApp names; the
rotated-photo grid badge uses the new RotateRight icon.

UPSTREAM-PR: storytold/lightcraft#1164

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
mattsivak added a commit to mattsivak/lightcraft that referenced this pull request Oct 12, 2026
@mattsivak

Copy link
Copy Markdown
Contributor Author

Icons, one by one: before (main) and after (this PR)

Each icon at 48 px on the app's dark background, rendered from the same path data the app paints (PNGs on pr-1104-icon-sheets). New = not on main; removed = unused on main, dropped here.

Icon Before After Change
Sidebar unchanged
Back unchanged
Forward unchanged
Search unchanged
Filter unchanged
Bell redrawn
Share unchanged
Help unchanged
Cloud redrawn
Sliders unchanged
Crop redrawn
Eraser redrawn
Mask redrawn
Eye redrawn
EyeOff redrawn
Presets redrawn
Versions redrawn
Activity redrawn
More unchanged
Tag unchanged
Info unchanged
GridPhoto unchanged
GridSquare unchanged
Single unchanged
Compare unchanged
Survey unchanged
Sort unchanged
Star unchanged
StarFilled redrawn
Circle unchanged
FlagPick redrawn
FlagReject redrawn
Gear redrawn
Filmstrip redrawn
BeforeAfter unchanged
ChevronDown unchanged
ChevronRight unchanged
ChevronLeft unchanged
TriangleLeft unchanged
Plus unchanged
Album unchanged
SmartAlbum unchanged
Stack unchanged
Folder unchanged
Pencil unchanged
Photos unchanged
Clock unchanged
Calendar unchanged
Trash unchanged
Curve unchanged
ProfileGrid unchanged
Close unchanged
Check unchanged
Brush redrawn
Linear redrawn
Radial redrawn
Sky redrawn
Subject unchanged
Picker redrawn
RotateDrag unchanged
Target unchanged
Chat unchanged
FaceBox unchanged
GradeAll unchanged
GradeShadows unchanged
GradeMidtones redrawn
GradeHighlights unchanged
Monitor unchanged
Sun unchanged
Moon unchanged
RedEye — new
Palette — new
Object — new
Describe — new
Background — new
People — new
Landscape — new
Luminance — new
Depth — new
Dots — removed (unused)
Edited — removed (unused)
Flip — removed (unused)
Heart — removed (unused)
Invert — removed (unused)
Minus — removed (unused)
Rotate — removed (unused)
Video — removed (unused)

79 icons after (9 new, 21 redrawn, 49 unchanged); 8 removed.

@mattsivak
mattsivak marked this pull request as ready for review October 12, 2026 09:23
@mattsivak

Copy link
Copy Markdown
Contributor Author

Marked ready. Verification on a second macOS machine at f94de121 (adds the CLAUDE.md wording for Lucide-derived icons):

  • cargo xtask ci: fmt, clippy, parity, layers, assets and wasm pass.
  • Workspace tests (--no-fail-fast): 91 suites, 3029 passed, 12 failed. Every failure reproduces identically on plain main on the same machine and none is in code this PR touches: catalog::tests_lock::dropping_the_lock_frees_the_library_while_another_thread_spawns_processes (child spawn never starts, sandboxed or not), 10 × engine::sidecar::tests_repair_* and engine::tests_lightroom_folder::odd_folders_never_fail_the_check (file-rename / odd-name filesystem errors), and ui-egui::tests_dialog_fit::export_dialog_is_unchanged_in_a_tall_window (the dialog measures 876 pt on this machine vs the test's 846, also on main).
  • The per-icon before/after table is in the comment above; the Penpot review boards led to a follow-up selection (some icons kept from main, some restyled) that will come as a separate PR on top of this one, so Edit panel: icon buttons with tooltips in Crop, Geometry and Masks (#972, stacked on #1104) #1164 can keep stacking on this head.

@mattsivak

Copy link
Copy Markdown
Contributor Author

Merge-order note: the as_chunks change in crates/pipeline/src/spots.rs (4b1c5b4e) is the same fix as #997 and conflicts with it textually; whichever lands second takes the other's version. #1164 stacks on this PR.

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and tested at f94de12 on Linux (ui-egui and pipeline tests, see below).

The licensing is handled carefully:

  • The ISC notice is in NOTICE and assets/licenses/ISC-Lucide.txt.
  • The ATTRIBUTION.md row lists the Lucide-derived arms by name, and each lucide! arm is commented with its Lucide source.
  • CLAUDE.md now states the rule (never Adobe, never GPL/LGPL).

The path reader never panicking on fuzzed input, and Icon::ALL coming from one macro list, are good safeguards.

Comments:

  • Attribution kept in sync by hand: the list in assets/ATTRIBUTION.md has to be kept in step with the lucide! arms manually. A small test, or a cargo xtask assets check, that compares the arms' // Lucide comments with the attribution row would keep the next added icon from being missed.
  • Depth and Luminance: the arm commented "as Lucide contrast, filled" (icons.rs:693) is drawn by hand, and layers (icons.rs:698) is a lucide! arm. Please check that the attribution's "Depth" entry points to the layers arm, and that Luminance, which isn't listed, really isn't derived from Lucide.
  • Merge order: the spots.rs as_chunks change duplicates #997/#1317/#1308 (you noted this).

Tests: cargo test -p lightcraft -p lightcraft-pipeline -p lightcraft-ui-egui passes on Linux.

mattsivak added a commit to mattsivak/lightcraft that referenced this pull request Oct 13, 2026
…t no longer claims Lucide origin)

Review on storytold#1104: the Depth attribution entry is the `layers` lucide! arm, and
Luminance is a hand-drawn ring and half-disc with no Lucide path data, so it
stays out of the Lucide attribution row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattsivak

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @FredApps.

  • Depth and Luminance: Depth is right. It's the lucide! arm drawing Lucide layers, and the ATTRIBUTION.md row names it. Luminance isn't Lucide-derived: it's a hand-drawn circle plus a half disc with no Lucide path data, so it correctly isn't in the row. Its comment "(as Lucide contrast, filled)" wrongly suggested otherwise, so f92d1347 rewords it to say it's our own drawing. I also checked every lucide! arm against the attribution row, and they match.
  • Merge order / spots.rs: main is merged in (f92993a0). spots.rs was the only conflict; both sides had the same as_chunks fix, so it now takes main's version.
  • Keeping the attribution in sync by hand: noted.

cargo xtask ci passes, as does the workspace test run apart from visualize::tests::all_masks_overlay_shows_every_visible_mask_at_once. That test fails the same way on a fresh main checkout, and this PR doesn't touch crates/pipeline.

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rechecked f92d134. Within the icon/attribution scope, the only follow-up change is the corrected Luminance origin comment; drawing code is unchanged from the reviewed version, and Depth remains attributed to Lucide layers. The rebuilt icon suite passed four tests with one ignored. The rebase keeps main's spots.rs resolution. No new blocking defect found; the earlier attribution question is addressed.

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rechecked the follow-up at 9220837 against f92d134. The delta is confined to the Sliders drawing: two tracks with solid knobs replace three tracks with rings. No new blocking code issue found in that change. Independently reran icons::tests on the exact head: 4 passed, 1 ignored. This was a source and automated-test check; I have not independently compared the new glyph at 10–14 px on physical displays.

mattsivak and others added 5 commits October 15, 2026 09:26
Rank the in-app icon set by eye (contact sheet: icon_contact_sheet, ignored test) and
replace the worst:
- StarFilled: one fan mesh plus outline, no anti-aliasing seams between triangles
- Picker (read as a hammer), Gear (read as a sun), Cloud, Sky, Brush, Filmstrip (credit
  card), FlagPick/FlagReject (illegible X), Crop, Eraser, Eye/EyeOff, Bell, Presets,
  Versions, Heart, Edited, Rotate: Lucide (ISC) path data
- Activity was a copy of Clock: now a history clock
- Mask, Linear, Radial: our own, a family of dashed/solid guide shapes
New icons so one glyph no longer stands for several things: RedEye (Red Eye tool, was the
visibility eye), Palette (Color Mixer, was Radial), Object, Describe, Background, People,
Landscape, Luminance, Depth (masks that all shared Subject/Sky/Sliders); Color Grading uses
GradeAll instead of Presets.

Pen::svg strokes SVG path data (M L H V C S Q T A Z) through a small reader that never
panics on malformed input (tested with fixed junk and 2000 random strings).
Lucide's licence: assets/licenses/ISC-Lucide.txt; attribution row in assets/ATTRIBUTION.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d icon table

/simplify and /code-review follow-ups to the icon overhaul:
- lucide! caches each icon's parsed subpaths in a static; nothing is re-parsed per frame
- curves flatten through epaint's Cubic/QuadraticBezierShape; the path reader is a
  PathReader with a step method instead of a closure called in place
- Pen::line rounds its ends (opaque colours, >= 2 px strokes), so hand-drawn and Lucide
  icons match; Pen::fill takes the pen's colour; Pen::half_disc for GradeMidtones/Luminance
- Icon and Icon::ALL come from one macro list; the eight unused icons are gone
- masking.rs: kind_icon is the one table for the Create New Mask tiles and the mask list
- the contact sheet is written as PNG with lightcraft_codecs
- reader: a failed command after Z leaves no stray dot; 1e2.5 lexes as 1e2 and .5
- Linear's dashed centre line is symmetric about its pin
- NOTICE carries Lucide's ISC notice (it ships with every release); ATTRIBUTION rows updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ibution

The asset rules said every icon in icons.rs was original work; since the Lucide arms that is no
longer true. Say what is allowed (own work, or Lucide under ISC, each named in the attribution
row), where the notice lives, and that Adobe and GPL icon sets stay off-limits.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…t no longer claims Lucide origin)

Review on storytold#1104: the Depth attribution entry is the `layers` lucide! arm, and
Luminance is a hand-drawn ring and half-disc with no Lucide path data, so it
stays out of the Lucide attribution row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three tracks with r=2 rings crowded the Edit icon at 10–14 px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattsivak
mattsivak force-pushed the worktree-icon-overhaul branch from 9220837 to 4782f77 Compare October 15, 2026 07:35

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rechecked 4782f77 against the previously reviewed 9220837 icon/attribution scope. The rebase adapts the Play arm to the updated Pen::fill signature; it retains the current pen color. I found no new blocking code defect in that scoped change.

Independent Linux validation on this exact head: icons::tests passed 4 tests with the contact-sheet test initially ignored; that test was then run explicitly and passed (5 unique tests, 0 failures). Strict affected-UI all-target Clippy and scoped UI WASM check passed. All 980 tracked source files were unchanged. Formatting and assets checks passed in the earlier stage of this same exact-head validation.

The contact-sheet artifact was generated, but I have not independently inspected it in this review or qualified 10–14 px physical-display rendering, interaction, theme, GPU or accessibility behavior. Optional craft-fonts were absent and the existing WASM warnings remain; this is not a full-workspace or native-interaction qualification.

@wanikhawar

Copy link
Copy Markdown
Contributor

Please include the Feather MIT licence text if any adapted icon (Bell, Eye, Cloud, Crop, Activity) descends from Feather, and check that cargo xtask assets accepts the new assets/licenses/ folder. Please also say how this relates to #1926, and consider leaving the removal of 8 unused Icon variants out of this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants