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
This commit is contained in:
Harley Acheson
2024-07-19 04:17:52 +02:00
committed by Harley Acheson
parent 3b4debd285
commit ef080a4219
2 changed files with 2 additions and 2 deletions

View File

@@ -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);
}

View File

@@ -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,