diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2021-01-26 22:14:54 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2021-01-26 22:15:42 +0300 |
commit | c32c6a5f857675ad4cf3538f1b8a44419272af10 (patch) | |
tree | 7db1df02db5385b353609aaee9efc7c0e91528ad /source | |
parent | 1c4b0c47dd476c424b750edd4dadf977937fee85 (diff) |
UI: Current Frame Marker Cleanup
Draw current frame marker in a single pass.
Differential Revision: https://developer.blender.org/D10217
Reviewed by Hans Goudey
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/animation/time_scrub_ui.c | 25 |
1 files changed, 9 insertions, 16 deletions
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); |