From c32c6a5f857675ad4cf3538f1b8a44419272af10 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Tue, 26 Jan 2021 11:14:54 -0800 Subject: UI: Current Frame Marker Cleanup Draw current frame marker in a single pass. Differential Revision: https://developer.blender.org/D10217 Reviewed by Hans Goudey --- source/blender/editors/animation/time_scrub_ui.c | 25 +++++++++--------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'source/blender/editors/animation') diff --git a/source/blender/editors/animation/time_scrub_ui.c b/source/blender/editors/animation/time_scrub_ui.c index f5240d67cca..034378399b9 100644 --- a/source/blender/editors/animation/time_scrub_ui.c +++ b/source/blender/editors/animation/time_scrub_ui.c @@ -124,29 +124,22 @@ static void draw_current_frame(const Scene *scene, UI_draw_roundbox_corner_set(UI_CNR_ALL); - UI_draw_roundbox_3fv_alpha( - &(const rctf){ - .xmin = frame_x - box_width / 2 + U.pixelsize / 2, - .xmax = frame_x + box_width / 2 + U.pixelsize / 2, - .ymin = scrub_region_rect->ymin + box_padding, - .ymax = scrub_region_rect->ymax - box_padding, - }, - true, - 4 * UI_DPI_FAC, - bg_color, - 1.0f); + float outline_color[4]; + UI_GetThemeColorShade4fv(TH_CFRAME, 5, outline_color); - UI_GetThemeColorShade4fv(TH_CFRAME, 5, bg_color); - UI_draw_roundbox_aa( + UI_draw_roundbox_4fv_ex( &(const rctf){ .xmin = frame_x - box_width / 2 + U.pixelsize / 2, .xmax = frame_x + box_width / 2 + U.pixelsize / 2, .ymin = scrub_region_rect->ymin + box_padding, .ymax = scrub_region_rect->ymax - box_padding, }, - true, - 4 * UI_DPI_FAC, - bg_color); + bg_color, + NULL, + 1.0f, + outline_color, + U.pixelsize, + 4 * UI_DPI_FAC); uchar text_color[4]; UI_GetThemeColor4ubv(TH_HEADER_TEXT_HI, text_color); -- cgit v1.2.3