diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2020-06-26 00:53:59 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2020-06-26 00:53:59 +0300 |
commit | 62aa103d485fd6e0b15100c1928695c4fb3ce039 (patch) | |
tree | 9306d7ba27c904b611e7da46e23e652bd533a2ff /source/blender/editors/animation | |
parent | af4e68357b8a84f9b0b71fa7714e31e0f3909c4d (diff) |
Fix for T78191: Timeline lines changing thickness
Fixes issue where lines in timeline are sometimes double-width when hovering in area.
Differential Revision: https://developer.blender.org/D8116
Reviewed by Brecht Van Lommel
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/time_scrub_ui.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/animation/time_scrub_ui.c b/source/blender/editors/animation/time_scrub_ui.c index f4ed2add624..edc36326c57 100644 --- a/source/blender/editors/animation/time_scrub_ui.c +++ b/source/blender/editors/animation/time_scrub_ui.c @@ -112,16 +112,15 @@ static void draw_current_frame(const Scene *scene, /* Draw vertical line to from the bottom of the current frame box to the bottom of the screen. */ const float subframe_x = UI_view2d_view_to_region_x(v2d, current_frame + sub_frame); - GPU_line_width(2.0f); GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); immUniformThemeColor(TH_CFRAME); - immBegin(GPU_PRIM_LINES, 2); - - immVertex2f(pos, subframe_x, scrub_region_rect->ymax - box_padding); - immVertex2f(pos, subframe_x, 0.0f); - immEnd(); + immRectf(pos, + subframe_x - U.pixelsize, + scrub_region_rect->ymax - box_padding, + subframe_x + U.pixelsize, + 0.0f); immUnbindProgram(); } |