From ef42dcd31e773b4c2c7ee5f6ef220ea3ce03bf76 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Fri, 2 Nov 2018 16:16:33 +0100 Subject: [PATCH] UI: Darken the backdrop of navigation gizmos. Bright backdrop would get lost when having bright elements/background in the viewport. This makes it use a darkened/lighten version of the theme space header color. Since icons are colored using the 'text' value of the Theme Space, it's likely that any theme is going to have a contrasting background color, but just in case darken/lighten it slightly. --- source/blender/editors/space_view3d/view3d_gizmo_navigate.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c index d17f0df0c20..d45da76a477 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c @@ -156,8 +156,10 @@ static void WIDGETGROUP_navigate_setup(const bContext *UNUSED(C), wmGizmoGroup * gz->color_hi[3] = 0.1f; } else { - gz->color[3] = 0.2f; - gz->color_hi[3] = 0.4f; + 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; }