Commit: bd1ba2f7a9100a237d0e55dc7ceab218f131a602
Author: Campbell Barton
Date:   Sun Mar 3 11:27:36 2019 +1100
Branches: master
https://developer.blender.org/rBbd1ba2f7a9100a237d0e55dc7ceab218f131a602

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.

===================================================================

M       source/blender/editors/space_view3d/view3d_gizmo_navigate.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c 
b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
index a86e4ac7f98..cd1bdab9500 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
@@ -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);
+
                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to