mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-24 09:57:08 -06:00
Photoshop's Create Rectangle switches only the right-clicked field (Width 35.28 mm, Height still 100 px), lists the six length units without Percent, and opens in pixels again after OK. The PR shared one unit between both fields, offered Percent, and saved the unit on every OK, so after one use with the rulers in px the dialog stayed in px even after the rulers changed to cm, though no unit was ever picked. Now each field has its own widthUnit / heightUnit (set only by the menu, never remembered), and the menu is rulers::unit_menu_of with LENGTH_UNITS. The new test right-clicks the real field and clicks the menu item through egui input. Co-authored-by: Korg1ch <57859048+Korg1ch@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>