UI: increase 3D view icon contrast over light colors
- Avoid using white with low alpha to make grey. Note that this is the second time we've run into this problem: T59626. - Use a light backdrop when the icons are dark so they're visible over a black background.
This commit is contained in:
parent
ae977d13f8
commit
bd1ba2f7a9
|
@ -151,10 +151,24 @@ static void WIDGETGROUP_navigate_setup(const bContext *UNUSED(C), wmGizmoGroup *
|
|||
gz->color_hi[3] = 0.1f;
|
||||
}
|
||||
else {
|
||||
UI_GetThemeColorShade3fv(TH_HEADER, -40, gz->color);
|
||||
UI_GetThemeColorShade3fv(TH_HEADER, 160, gz->color_hi);
|
||||
gz->color[3] = 0.4f;
|
||||
gz->color_hi[3] = 0.2f;
|
||||
uchar icon_color[3];
|
||||
UI_GetThemeColor3ubv(TH_TEXT, icon_color);
|
||||
int color_tint, color_tint_hi;
|
||||
if (icon_color[0] > 128) {
|
||||
color_tint = -40;
|
||||
color_tint_hi = 60;
|
||||
gz->color[3] = 0.5f;
|
||||
gz->color_hi[3] = 0.5f;
|
||||
}
|
||||
else {
|
||||
color_tint = 60;
|
||||
color_tint_hi = 60;
|
||||
gz->color[3] = 0.5f;
|
||||
gz->color_hi[3] = 0.75f;
|
||||
}
|
||||
UI_GetThemeColorShade3fv(TH_HEADER, color_tint, gz->color);
|
||||
UI_GetThemeColorShade3fv(TH_HEADER, color_tint_hi, gz->color_hi);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue