Commit Graph
9 Commits
Author SHA1 Message Date
Gabriel Heuser 24be8ea6e2 Add editable arrowheads to Line tool (#6408) (#9259)
* Add configurable arrowheads to line tool

* Add editable arrowheads to Line tool

* Fix arrow scaling validation and PSD import defaults

* Preserve arrow geometry under affine transforms

* Preserve scaled arrowhead dimensions and prevent non-finite geometry

* Localize arrowhead Start and End labels

* Fix arrow transform editability and short line handling

* Fix PSD arrow concavity serialization

* Fix arrow dimension fallback validation

* Refine arrowhead options UI to match Photoshop

* Add opt-in arrowhead defaults to Shape properties

* Fix tool reset syntax after upstream merge

* Validate arrowhead flags and clamp copied defaults

* Preserve editable headless lines under transforms

* Fix arrowhead UI imports and formatting after v0.17 merge

* Format arrowhead properties after v0.18 merge

* Fix Clippy lint errors in arrow geometry and tests

* Fix headless arrow geometry after nonuniform scaling

* Fix proportional arrow scaling in Properties panel

* Fix Rust formatting in Properties arrow scaling tests

* test: validate invalid arrowhead dimensions without mutation

* fix: preserve arrow compatibility with older pcraft versions
2026-11-01 18:46:05 -05:00
Claude 957e7d3347 Merge storytold/photocraft main into the Fill/Stroke popover branch
Upstream moved the touched modules (dialogs/, tools/, widgets/ split) and
added its own Gradient tab to the shape Fill/Stroke swatches. Resolved by
porting this branch's changes onto the new layout:

- widgets/color.rs: color_edit_button* open the full Color Picker dialog
  (tests in widgets/color_button_tests.rs).
- tools/paint_picker.rs (was paint_picker.rs): the popover reuses
  shape_paint_ui::PaintChange (plus OpenPicker) and upstream's
  shape_gradient_ui Gradient tab instead of its own gradient preset list,
  so gradients now also work for the next shape's defaults.
- shape_paint_ui::swatch draws the popover; shape_options and
  vector_ui/options handle OpenPicker and Recently Used Colors.
- adjust_editors, caf_ui, file_ui call sites and tests moved to their
  new files; i18n entries appended after upstream's.
- docs/scorecard.md regenerated (12 of 181 settings unread).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TYsCL5E2GM6hUabP9dmYAv
2026-10-27 21:04:03 +00:00
096ad5b194 Integration: merge main, resolve conflicts (#7203)
Main moved the shape options bar and paint swatch out of vector_ui.rs into
shape_options.rs and shape_paint_ui.rs (#5452). Carry the PR's gradient paint
over: PaintChange::Gradient, paint_param and the swatch's Gradient tab live in
shape_paint_ui.rs, the tool gradients and set_tool_paint in shape_options.rs,
and shape_gradient_ui.rs is its own module. Both sides' new tests are kept.

Co-authored-by: Denis <179751626+deniskhud@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 13:26:26 +01:00
SimoneRecchia a5d555a3d0 Merge storytold/photocraft main into the Fill/Stroke popover branch
Conflicts:
- vector_ui.rs: main gave egui's shape picker a hex field and a screen
  colour button; this branch replaces that picker with the popover, whose
  Color Picker has both, so the popover version is kept.
- vector_paint_tests.rs: main's zero-width stroke tests are kept; its two
  hex tests now type and paste into the Color Picker the popover opens
  (the test harness draws dialogs, as the app does).
- i18n catalogs: both sides' new strings kept; fr and ru keep main's
  translations of Color Picker, Solid Color and Tint Color.
- paint_picker.rs uses photocraft_color::convert::hsb_to_rgb, which
  replaced color_picker_ui::hsv_to_rgb on main.
- docs: both sides' rows and revision entries kept; scorecard regenerated.
2026-10-22 21:24:19 +00:00
SimoneRecchia 729e5c68ed feat(ui): Photoshop Fill/Stroke popover and full Color Picker for every colour swatch
The shape Fill and Stroke swatches (options bar and Properties) opened egui's
built-in picker, which only has RGBA fields and no hex. They now open
Photoshop's popover: No Color, Solid Color, Gradient and Pattern along the
top, the Color Picker button at the top right, Recently Used Colors and the
swatch library's folders. Gradient applies a gradient preset to the selected
shape; Pattern is shown but off, since shapes don't render pattern paint yet.

The Color Picker button opens the full Color Picker dialog (HSB, RGB, Lab,
CMYK, hex, eyedropper) titled Color Picker (Fill Color) / (Stroke Color),
with a live canvas preview; OK is one undo step (shape_fill_ui::open_paint).

Every other colour swatch built on widgets::color_edit_button* (Photo
Filter, Black & White tint, Gradient Map stop, Content-Aware Fill overlay,
Filter Gallery glow, Save for Web colour table) now opens the same Color
Picker dialog instead of egui's picker; OK hands the colour back to the
swatch through color_picker_ui::widget_tick.

Recently Used Colors are kept in Preferences::recent_colors (newest first,
15), filled by the Color Picker's OK and by popover picks.
2026-10-21 10:54:46 +00:00
deniskhudandClaude Opus 5.5 89305c1d17 Shape tools: gradient Fill and Stroke from the swatches, with an editable stops strip
The shape Fill / Stroke swatches (options bar and Properties) offer No Color, Solid and
Gradient, as Photoshop's popover does, for the next shape and the selected one. The
Gradient tab (shape_gradient_ui.rs) has a Recent row, the preset library, a stops strip
(click to add a colour or opacity stop, drag to move, drag off to delete, midpoints) with
the selected stop's colour, opacity, location and Delete, and style, angle, scale,
Reverse and Align with layer. Stop edits reuse the Gradient Editor's apply_stop.

shape.create / shape.edit take and report every gradient field (opacityStops,
midpoints, offset, dither, align), so editing an imported gradient keeps the rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 23:13:04 +02:00
denstu473 ac8e60ff2e fix(ui): preserve shape stroke settings at zero width
Keep the selected shape's stroke when width reaches zero so subsequent
width edits retain its paint and geometry settings in both UI controls.
Preserve explicit No Color removal and gesture-scoped undo behavior.

Add real-widget regressions for style retention, native persistence,
rendering, undo/redo, and deliberate stroke activation.

Fixes #6191.
2026-10-16 07:11:27 +02:00
30bd8a5598 Fix Shape Stroke controls, popup interactions and paint colours (#3019)
Co-authored-by: optimalbytee <optimalbytee@users.noreply.github.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:46:44 -04:00
ae96037672 Expose native shape stroke controls with staged previews (#2218)
* Expose native shape stroke controls with staged previews

* Document shape stroke defaults in MCP control schema

* Regenerate docs/scorecard.md

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

---------

Co-authored-by: optimalbytee <optimalbytee@users.noreply.github.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:42:52 -04:00