From ef080a4219eef65da8512e34331e6f696bbd6299 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Fri, 19 Jul 2024 04:17:52 +0200 Subject: [PATCH] UI: Icon Hover Brightness for Properties Items Properties category icons with new SVG icons are slightly brighter than before, and therefore do not seem to brighten on hover. This PR makes them match exactly. Was assigning an alpha instead of multiplying. And an earlier refactor for outlines made these icons not show initially dimmer unless there is also an outline. Pull Request: https://projects.blender.org/blender/blender/pulls/125029 --- source/blender/editors/interface/interface_icons.cc | 2 +- source/blender/editors/interface/interface_widgets.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/interface/interface_icons.cc b/source/blender/editors/interface/interface_icons.cc index 37dee3363a5..4c4b2a235e7 100644 --- a/source/blender/editors/interface/interface_icons.cc +++ b/source/blender/editors/interface/interface_icons.cc @@ -1399,7 +1399,7 @@ static void icon_draw_size(float x, else { UI_GetThemeColor4fv(TH_TEXT, color); } - color[3] = alpha; + color[3] *= alpha; BLF_draw_svg_icon(uint(icon_id), x, y, float(draw_size) / aspect, color, outline_intensity); } diff --git a/source/blender/editors/interface/interface_widgets.cc b/source/blender/editors/interface/interface_widgets.cc index bf387710fe6..40e1b76cc8c 100644 --- a/source/blender/editors/interface/interface_widgets.cc +++ b/source/blender/editors/interface/interface_widgets.cc @@ -1365,7 +1365,7 @@ static void widget_draw_icon( UI_icon_draw_ex(xs, ys, icon, aspect, alpha, 0.0f, color, outline, &but->icon_overlay_text); } else if (!((but->icon != ICON_NONE) && UI_but_is_tool(but))) { - if (outline) { + if (has_theme) { alpha *= 0.8f; } UI_icon_draw_ex(xs,