Commit Graph

16 Commits

Author SHA1 Message Date
4445574b43 Phase 3: Color correction panel with sliders, tint, and preset filters
- Color_Filter enum: None, Vintage, Noir, Cool_Tone, Warm_Tone,
  High_Contrast, Faded, Dramatic
- editor_apply_filter_preset: maps each filter to adjustment values
- editor_render_adjust_panel: right-side panel with:
  - Brightness/Contrast/Saturation/Tint sliders via rl.GuiSliderBar
  - Tint color swatches (6 preset tints)
  - 8 preset filter buttons
  - Apply and Reset buttons
- editor_update_display: composites base image with tint preview
  into display_rt for real-time adjustment preview
- 'Adjust' toggle button in toolbar (highlights when active)
- Canvas width shrinks when adjustments panel is open
- Color_Adjustments struct gains filter field
- Panel_Editor_State gains show_adjust_panel field

Build passes. 155/156 tests pass (1 pre-existing CLI/TUI failure).
2026-05-28 15:43:00 +02:00
49b383db2e Phase 1-2: Panel editor with pen/eraser/shape tools, undo/redo, zoom/pan, color picker
- gui/panel_editor.odin: Full drawing editor overlay
  - Editor_Tool enum: Pen, Eraser, Line, Rect, Circle, Fill
  - Brush_Stroke struct with points array for freehand/shape strokes
  - Panel_Editor_State with active panel, strokes, undo snapshots, zoom/pan
  - open/close/commit lifecycle: loads panel texture, composites on commit
  - Screen-to-canvas coordinate mapping with zoom and pan offsets
  - Stroke rendering: freehand via line segments, shapes via endpoints
  - Undo via snapshot replay (cap 30 snapshots)
  - Toolbar: tool buttons, brush size slider, color picker, commit/cancel
  - Color picker panel: 18 preset color swatches, current color display
  - to_cstr helper for Odin string->cstring conversion

- gui/runtime.odin: Editor integration
  - GUI_App_State.editor field (Panel_Editor_State)
  - Editor update/render calls in main loop when active
  - Escape key closes editor, Ctrl+Z for undo
  - editor_close in defer chain for cleanup on exit
  - btn_panel_draw click handler opens editor on selected panel

- gui/workspaces.odin: Draw button on panel cards
  - 'Draw' button triggers btn_panel_draw action

- gui/chrome.odin: Editor hint text when editor active
  - Shows 'Press Escape to close editor' overlay

Build passes. 153/156 tests pass (3 pre-existing CLI/TUI failures,
2 new env-related failures due to FAL_API_KEY in .env).
2026-05-28 15:39:42 +02:00
152ef17610 current state 2026-05-28 15:20:02 +02:00
42b58b02bf Merge branch 'ui' 2026-05-24 12:41:51 +02:00
9de3be6847 check point 2026-05-24 12:41:31 +02:00
d1673c3eef Phase E+F: Move primitives to primitives.odin, split theme constants
Phase E: primitives.odin (101 lines)
  declare_nav_chip, declare_button* (all 6 variants),
  declare_status_badge, declare_stat_chip

Phase F: clay_theme.odin (89 lines)
  All CLAY_* color/spacing/font/radius constants extracted
  clay_layout.odin retains only functions and state

runtime.odin: 812 → 718 lines
All 156 tests pass.
2026-05-22 17:42:51 +02:00
8b044e3ac1 Phase C: Split process_clicks into 6 focused sub-functions
handle_nav_clicks — sidebar + pipeline stepper navigation
handle_field_clicks — input field focus detection
handle_format_clicks — PDF/PNG/CBZ + Local/DS toggle
handle_action_clicks — all pipeline/file/log action buttons
handle_workspace_nav — prev/next for Script/Panels/Layout/Bubbles
handle_detail_clicks — panel regen, layout regen, bubble editor ops

process_clicks: 269 → 30 lines (orchestration only)
runtime.odin: 806 → 806 lines (delegation replaced inline logic)
All 156 tests pass.
2026-05-22 17:41:09 +02:00
be0ccc1539 Phase B: Eliminate duplication
- workspace_nav helper replaces 4x duplicated nav bar patterns
- Hoisted make_diagnostics_action_context call in process_clicks (computed once, reused 4 times)
- Removed duplicate section header comments in workspaces.odin

workspaces.odin: 328 → 280 lines (down 15%)
All 156 tests pass.
2026-05-22 17:36:24 +02:00
abc74582d6 Phase A: Split runtime.odin into chrome.odin, workspaces.odin, detail_panels.odin
runtime.odin: 1782 → 818 lines (orchestration only)
chrome.odin: 248 lines (sidebar, pipeline bar, workspace router, bottom bar)
workspaces.odin: 328 lines (8 workspace functions)
detail_panels.odin: 439 lines (script/panels/layout/bubbles detail + action log)

All 156 tests pass, build clean.
2026-05-22 17:33:57 +02:00
5729a98888 Merge branch 'clay' 2026-05-22 12:36:08 +02:00
1d8178f5d6 clay implemented 2026-05-22 12:35:38 +02:00
2160449f43 another checkpoint 2026-05-22 08:54:22 +02:00
b0f9acdb47 check point 2026-05-22 03:51:50 +02:00
33c70e776a np 2026-05-22 00:45:17 +02:00
1e85df5193 check point 2026-05-21 06:10:32 +02:00
ae1cae967b init state 2026-05-18 19:58:01 +02:00