mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-05 19:51:26 -05:00
be9a07c365
An opacity is stored as an f32 fraction, and these fields showed it as f64::from(opacity) * 100.0, so 51% read back as 50.999999%. The number field treats that value as off its step grid, so an Up press went to 51% again and every later press repeated it; Down stalled the same way at values such as 99%. The Control bar's Opacity, the Gradient panel's stop Opacity and the Color Wheel panel's Show Opacity field now show the whole percent when it stores as the same f32 (panels::shown_percent), and the exact percent otherwise. Part of #10903. #10910 fixes the Properties and Transparency Opacity fields the same way.