mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 09:26:43 +00:00
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.