Fix #116848 : Mask handles set to "Free" ignore theme color #116898

Merged
Philipp Oeser merged 1 commits from lichtwerk/blender:116848 into main 2024-01-12 15:42:09 +01:00

1 Commits

Author SHA1 Message Date
Philipp Oeser 4a385abcaa Fix #116848 : Mask handles set to "Free" ignore theme color
Reason is that `.handle_free` and `.handle_sel_free` are never really
defined as RGBA defaults in `U_theme_default` `.space_image` (nor
`.space_clip` and `.space_graph` ) with full alpha (as opposed to the
other handle types).

If we read these with `immUniformThemeColor` then we are ending up with
with zero alpha.

So in the Image Editor or Movie Clip Editor, we only see the grey
"Outline" (if the mask display is set to this - which is by default),
the handles themselves are in visible, making it look like those were
always drawn in grey and the Preference would have no effect.

We also dont really have a preference color defined for free handles
(they are set to black).

So there are two possible solutions:
- [1] come up with a good color, define as RGBA default in
`U_theme_default and overwrite user Preferences in `do_versions_theme`
(with a version bump)
- [2] read existing Preferences with `immUniformThemeColor3` (instead of
`immUniformThemeColor`) to work around the alpha problem

This patch uses the second (and less disruptive) solution.
2024-01-08 14:47:49 +01:00