diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-03 16:11:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-03 16:13:25 +0300 |
commit | 301494f94a7fba5100cdfa5d48491c1df82e235a (patch) | |
tree | 3aeca8cae6c50057a6348bf4065eb9d5a0d6e6d2 /source/blender | |
parent | a7f5de75f80146f49dad24ef75c3f65199d9abc3 (diff) |
UI: use grey for 3D view axis gizmo highlight
Using white with low alpha made it hard to use on a white background.
Since the axes themselves highlight to white.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_gizmo_navigate.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c | 21 |
2 files changed, 8 insertions, 18 deletions
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c index cd1bdab9500..037c0e53247 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c @@ -148,7 +148,8 @@ static void WIDGETGROUP_navigate_setup(const bContext *UNUSED(C), wmGizmoGroup * if (i == GZ_INDEX_ROTATE) { gz->color[3] = 0.0f; - gz->color_hi[3] = 0.1f; + copy_v3_fl(gz->color_hi, 0.5f); + gz->color_hi[3] = 0.5f; } else { uchar icon_color[3]; @@ -168,10 +169,8 @@ static void WIDGETGROUP_navigate_setup(const bContext *UNUSED(C), wmGizmoGroup * } UI_GetThemeColorShade3fv(TH_HEADER, color_tint, gz->color); UI_GetThemeColorShade3fv(TH_HEADER, color_tint_hi, gz->color_hi); - } - /* may be overwritten later */ gz->scale_basis = (GIZMO_SIZE * GIZMO_MINI_FAC) / 2; if (info->icon != 0) { diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c b/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c index 906ff5d8058..fa1b91b255d 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c @@ -261,30 +261,21 @@ static void axis_geom_draw( } #endif + /* Circle defining active area. */ + if (color[3] != 0.0f) { + immUniformColor4fv(color); + imm_draw_circle_fill_3d(pos_id, 0, 0, 1.0f, DIAL_RESOLUTION); + } + GPU_matrix_push(); GPU_matrix_mul(gz->matrix_offset); - bool draw_center_done = false; - for (int axis_index = 0; axis_index < ARRAY_SIZE(axis_order); axis_index++) { const int index = axis_order[axis_index].index; const int axis = axis_order[axis_index].axis; const bool is_pos = axis_order[axis_index].is_pos; const bool is_highlight = index + 1 == gz->highlight_part; - /* Draw slightly before, so axis aligned arrows draw ontop. */ - if ((draw_center_done == false) && (axis_order[axis_index].depth > -axis_depth_bias)) { - - /* Circle defining active area (revert back to 2D space). */ - if (color[3] != 0.0f) { - GPU_matrix_pop(); - immUniformColor4fv(color); - imm_draw_circle_fill_3d(pos_id, 0, 0, 1.0f, DIAL_RESOLUTION); - GPU_matrix_push(); - GPU_matrix_mul(gz->matrix_offset); - } - draw_center_done = true; - } UI_GetThemeColor3fv(TH_AXIS_X + axis, axis_color[axis]); axis_color[axis][3] = 1.0f; |