The link applied its state only when its button was clicked, so turning
it off and on again through `ui.dialog.set` kept the old proportions,
and the next dialog didn't open with the state set that way. A link
turned on at a side of zero also took new proportions on the next frame
once that side was a size again.
The dialog now keeps the link state it last applied and applies any
change from it, however it was made: turned on, the link keeps the
sizes the dialog shows then; turned off, it forgets them; either way
the next dialog opens with the new state. Nothing else recalculates the
proportions, so a link turned on at a side of zero stays unconstrained
until it is turned off and on again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EjfPR4a1jPek7r3nyFFNYv
A click with the Rectangle, Rounded Rectangle or Ellipse tool opens a
dialog with Width and Height. It now has a Constrain Width and Height
Proportions link beside the two rows, drawn like the Transform panel's:
while it is on, typing one side sets the other at the proportions the
shape had when the link was turned on. The next of these dialogs opens
with the link as the last one left it.
Width now comes before Height in these dialogs: the fields were listed
by name, so Height came first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EjfPR4a1jPek7r3nyFFNYv
The window's CAMetalLayer had no color space: wgpu 30.0.1 sets it to
nil for an sRGB surface each time it configures the surface, and Core
Animation does not color-match a layer without one. On a wide-gamut
display #FF0000 showed as the display's own red, (255, 0, 0) in a
capture where Preview shows the same sRGB red as (234, 51, 35).
A paint callback that draws nothing runs after egui configures the
surface and before the frame is presented. It sets sRGB on each
window's Metal layer that has no color space and leaves any other color
space as it is. wgpu's own fix (gfx-rs/wgpu#10286) is in no release yet.
Fixes#3161.
The Color Guide kept the base color it took when the panel first showed,
and only the base chip changed it. In a new document the current fill is
white, so every harmony and variation was white or gray until the base
chip was clicked with another current color.
A color chosen in the Color panel (spectrum, sliders, fields, chips and
Recent Colors), in the Swatches panel or a swatch library panel, or with
OK in the Color Picker for a fill or stroke now becomes the guide's base
color, and the guide shows its harmonies. A color applied from the guide
itself leaves the base as it is, and so does selecting artwork. The base
chip (Set base color to the current color) still makes the current color
the base. A new base clears the cells selected for Save Colors as
Swatches.
The base moves from egui's temporary memory to UiState::color_guide_base,
which is not saved, so the Color panel, the Swatches panels and the Color
Picker can set it.
Found while testing crates/text/src/hyphen.rs:74-90 (parse_exception)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`cargo build -p vectorcraft` on macOS stops with nine E0433 errors:
app.rs and host_services.rs use `mac_menu`, `mac_window`,
`open_documents`, `gpu`, `mac_save_format`, `mac_tablet` and
`mac_screen_color` without importing them since those items moved out
of main.rs. The two files now import them under the same cfg as the
code that uses them.
`cargo clippy -p vectorcraft --all-targets -- -D warnings` on macOS then
stops at the wildcard import in clipboard.rs's macOS module, which now
names the two items it uses.
Other platforms compile the same code as before.