[Bf-blender-cvs] [c32c6a5f857] master: UI: Current Frame Marker Cleanup

Harley Acheson noreply at git.blender.org
Tue Jan 26 20:15:50 CET 2021


Commit: c32c6a5f857675ad4cf3538f1b8a44419272af10
Author: Harley Acheson
Date:   Tue Jan 26 11:14:54 2021 -0800
Branches: master
https://developer.blender.org/rBc32c6a5f857675ad4cf3538f1b8a44419272af10

UI: Current Frame Marker Cleanup

Draw current frame marker in a single pass.

Differential Revision: https://developer.blender.org/D10217

Reviewed by Hans Goudey

===================================================================

M	source/blender/editors/animation/time_scrub_ui.c

===================================================================

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);



More information about the Bf-blender-cvs mailing list