Lightningbeam/lightningbeam-ui/lightningbeam-editor/src
Skyler Lehmkuhl 5e73f7f75d Painting UX: unified color/brush tools, tablet buttons, layer opacity
Addresses a batch of issues found during a painting test.

Tools
- Paint bucket used the background color unconditionally. It now picks
  FG/BG like the brush does, via a shared Color: [FG][BG] row that every
  color-using tool renders (brush, bucket, eyedropper).
- The eyedropper previously inferred its target swatch from
  active_color_mode, which was only ever set as a side effect of opening
  a color picker — so where a sample landed depended on invisible state.
  It now has an explicit toggle, and active_color_mode is gone.
- Effect brushes (dodge/burn, sponge, blur, smudge, clone, heal, pattern)
  were stuck on a hardcoded Gaussian dab. Replaced ~20 flat per-tool
  fields with a BrushKind -> BrushSlot model: every dab-painting tool now
  owns its size/strength/hardness/spacing, its .myb preset, and its FG/BG
  choice, and gets the full brush library. base_settings already flowed
  into the dab engine independently of blend_mode, so this needed no core
  or WGSL changes.

Cursors
- Rebuilt around three kinds instead of "icon = cursor": System (real OS
  cursor for Select/Transform), Precise (glyph with a real tip, e.g.
  pencil/pipette), and Badge (crosshair marks the click point, glyph sits
  to its bottom-right) for icons with no focus point.
- Cursors are now OS-composited via egui::CursorImage rather than painted
  into the scene, so they no longer lag the pointer. Glyphs are rasterized
  from egui's font atlas using epaint's own placement maths, so they land
  where painter.text put them. Drops the SVG cursor rasterization path.

Tablet
- The Wayland backend never handled zwp_tablet_tool_v2 Button events, so
  stylus barrel buttons were silently dropped. Both Wayland and X11 now
  emit them, with actions bound in Preferences (Pan/Eyedropper/Eraser).
  A pan-bound button suppresses the tool the way Alt+drag does, since the
  pen tip is still down while panning. Also adds middle-mouse panning.

Timeline
- Raster layers had no opacity control; the slider always drove volume,
  which is meaningless on them. The layer row is now three tiers, and each
  layer only shows controls that apply to it: Vector/Video get both volume
  and opacity (they can hold movie clips with audio), Raster/Text get
  opacity, Audio gets volume. Mute/solo are hidden where there's no audio.
- Layer toggles use Lucide icons with tooltips, and gain a visibility
  (eye) toggle. LayerProperty::Visible already existed but was only
  reachable from the info panel.
- Below 1.5x the layer-header width, the track area is dropped and the
  headers take the full pane.

Panes
- Color picker popups closed on any click (including on their own hue
  slider) and would not close on a drag — so drawing on the stage left one
  open. Shared color_swatch widget closes on a press outside instead.
- Stage header gains undo/redo buttons for tablet use, and taller targets.
- Toolbar is real egui layout (horizontal_wrapped) instead of absolute
  rect math, so it scrolls when the pane is too short.
- Tools with no SVG icon use Lucide glyphs instead of a TODO placeholder.
2026-07-14 13:04:38 -04:00
..
export Timeline types stage 2: fix editor seconds↔beats at every clip boundary 2026-07-11 14:10:38 -04:00
mobile Painting UX: unified color/brush tools, tablet buttons, layer opacity 2026-07-14 13:04:38 -04:00
panes Painting UX: unified color/brush tools, tablet buttons, layer opacity 2026-07-14 13:04:38 -04:00
preferences Painting UX: unified color/brush tools, tablet buttons, layer opacity 2026-07-14 13:04:38 -04:00
tools Painting UX: unified color/brush tools, tablet buttons, layer opacity 2026-07-14 13:04:38 -04:00
widgets Painting UX: unified color/brush tools, tablet buttons, layer opacity 2026-07-14 13:04:38 -04:00
config.rs Painting UX: unified color/brush tools, tablet buttons, layer opacity 2026-07-14 13:04:38 -04:00
cqt_gpu.rs Add clip split and duplicate commands 2026-02-15 02:11:57 -05:00
curve_editor.rs Clean up build warnings 2026-06-21 16:48:59 -04:00
custom_cursor.rs Painting UX: unified color/brush tools, tablet buttons, layer opacity 2026-07-14 13:04:38 -04:00
debug_overlay.rs Composite grouped/nested video on the GPU path 2026-06-22 17:38:30 -04:00
default_instrument.rs clean up some compiler warnings 2025-12-03 06:39:26 -05:00
effect_thumbnails.rs Fix gamma handling and improve brush canvas performance 2026-06-16 08:32:39 -04:00
gpu_brush.rs Address code-review findings across export, decode, and data model 2026-06-26 17:47:32 -04:00
gpu_timer.rs Composite grouped/nested video on the GPU path 2026-06-22 17:38:30 -04:00
hw_video.rs hw: surface import_raw failures (diagnose washed-out 10-bit HDR) 2026-06-26 03:59:39 -04:00
keymap.rs Onion skinning (raster): toggle + tinted ghosts of the active layer 2026-06-20 23:05:57 -04:00
main.rs Painting UX: unified color/brush tools, tablet buttons, layer opacity 2026-07-14 13:04:38 -04:00
menu.rs Onion skinning (raster): toggle + tinted ghosts of the active layer 2026-06-20 23:05:57 -04:00
notifications.rs Address code-review findings across export, decode, and data model 2026-06-26 17:47:32 -04:00
nv12_blit.rs nv12: HDR-correct input — PQ/HLG EOTF + BT.2020→709 gamut (Stage A pt 1) 2026-06-26 02:47:09 -04:00
raster_tool.rs Clean up build warnings 2026-06-21 16:48:59 -04:00
sample_import.rs Repair test suite + fix sample key-range overlap bug 2026-06-23 19:07:06 -04:00
sample_import_dialog.rs Fit modal dialogs to the phone screen on mobile 2026-07-01 06:28:04 -04:00
svg_import.rs Address code-review findings across export, decode, and data model 2026-06-26 17:47:32 -04:00
tablet.rs Painting UX: unified color/brush tools, tablet buttons, layer opacity 2026-07-14 13:04:38 -04:00
test_mode.rs Clean up build warnings 2026-06-21 16:48:59 -04:00
theme.rs Unify colors via theme CSS variables; theme egui visuals 2026-07-01 07:08:00 -04:00
theme_render.rs Clean up build warnings 2026-06-21 16:48:59 -04:00
waveform_gpu.rs Stream audio & video from .beam container; waveform LOD pyramid + persistence 2026-06-17 13:52:38 -04:00