From 301494f94a7fba5100cdfa5d48491c1df82e235a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 4 Mar 2019 00:11:07 +1100 Subject: 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. --- .../space_view3d/view3d_gizmo_navigate_type.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c') 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; -- cgit v1.2.3