Fix #80356: UI Icon Alpha Should Not Affect Matcaps & Studio Lighting

Changing Icon Alpha in Preferences / Themes / User Interface / Styles /
Icon Alpha is meant to change the opacity of the UI icons. It should not
change the opacity of the previews of Matcaps and Studio lights as this
changes the color because of mixing with the background. This PR just
skips this icon type when changing the alpha for this preference.

Pull Request: https://projects.blender.org/blender/blender/pulls/131690
This commit is contained in:
Harley Acheson
2024-12-10 18:19:28 +01:00
committed by Harley Acheson
parent e29bda07b3
commit 2b7a968909

View File

@@ -1468,7 +1468,11 @@ static void icon_draw_size(float x,
const float fdraw_size = float(draw_size);
Icon *icon = BKE_icon_get(icon_id);
alpha *= btheme->tui.icon_alpha;
if (icon->obj_type != ICON_DATA_STUDIOLIGHT) {
/* Icon Alpha should not apply to Mapcaps/Studio lighting. #80356. */
alpha *= btheme->tui.icon_alpha;
}
if (icon == nullptr) {
if (G.debug & G_DEBUG) {