[Bf-blender-cvs] [046afacbc69] master: Fix T77116: Current frame indicator text color hardcoded
Hans Goudey
noreply at git.blender.org
Mon Jun 15 14:36:00 CEST 2020
Commit: 046afacbc69069a2244f10a3a38e2f8afd8a5f39
Author: Hans Goudey
Date: Mon Jun 15 08:35:52 2020 -0400
Branches: master
https://developer.blender.org/rB046afacbc69069a2244f10a3a38e2f8afd8a5f39
Fix T77116: Current frame indicator text color hardcoded
Draw the text with the "header text highlight" theme color, which is
rarely used, making it a good candidate for this special case.
Differential Revision: https://developer.blender.org/D7897
===================================================================
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 7679995d9a4..863f433c778 100644
--- a/source/blender/editors/animation/time_scrub_ui.c
+++ b/source/blender/editors/animation/time_scrub_ui.c
@@ -95,7 +95,6 @@ static void draw_current_frame(const Scene *scene,
int current_frame)
{
const uiFontStyle *fstyle = UI_FSTYLE_WIDGET;
- const uchar color[] = {255, 255, 255, 255};
int frame_x = UI_view2d_view_to_region_x(v2d, current_frame);
char frame_str[64];
@@ -127,11 +126,13 @@ static void draw_current_frame(const Scene *scene,
4 * UI_DPI_FAC,
bg_color);
+ uchar text_color[4];
+ UI_GetThemeColor4ubv(TH_HEADER_TEXT_HI, text_color);
UI_fontstyle_draw_simple(fstyle,
frame_x - text_width / 2 + U.pixelsize / 2,
get_centered_text_y(scrub_region_rect),
frame_str,
- color);
+ text_color);
}
void ED_time_scrub_draw(const ARegion *region,
More information about the Bf-blender-cvs
mailing list