Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-03-03 03:27:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-03 04:15:03 +0300
commitbd1ba2f7a9100a237d0e55dc7ceab218f131a602 (patch)
tree3dc065c6c9b1c35ef790eb6ddc37673de9dd3f1f /source/blender/editors/space_view3d/view3d_gizmo_navigate.c
parentae977d13f8e9440294b00a510fc1d25c6609e2dd (diff)
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.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_gizmo_navigate.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_navigate.c22
1 files changed, 18 insertions, 4 deletions
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);
+
}