ColorEdit: Fix multiple issues. (#4014)

* Change g.ColorEditLastColor type to ImU32 and store RGB color value.
  - Fixes inability to change hue when saturation is 0. (#4014)
  - Fixes edgecases where lossy color conversion prevent restoration of hue/saturation.
  - Fixes hue value jitter when modifying color using SV square.
* Fix hue resetting to 0 when it is set to 255 by explicitly restoring hue if it is 0 and previous value was 1.
* Further reduce hue jitter by restoring hue when color is modified using SV square.
This commit is contained in:
Rokas Kupstys
2021-04-08 14:37:03 +03:00
committed by ocornut
parent 15132217a3
commit 30546bc0e7
4 changed files with 42 additions and 28 deletions

View File

@ -63,6 +63,10 @@ Other Changes:
The only situation where that change would make a meaningful difference is TreePush((const char*)NULL)
(_explicitely_ casting a null pointer to const char*), which is unlikely and will now crash.
You may replace it with anything else.
- ColorEdit4: Fixed not being able to change hue when saturation is 0. (#4014) [@rokups]
- ColorEdit4: Fixed hue resetting to 0 when it is set to 255. [@rokups]
- ColorEdit4: Fixed hue value jitter when source color is stored as RGB in 32-bit integer and perform
RGB<>HSV round trips every frames. [@rokups]
- Menus: Fixed vertical alignments of MenuItem() calls within a menu bar. (broken in 1.84). (#4538)
- Menus: Adjust closing logic to accomodate for varying font size and dpi.
- Menus: Fixed crash when navigating left inside a child window inside a sub-menu. (#4510).