diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-01-20 06:25:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-01-20 07:50:20 +0300 |
commit | 09eec627ed730532905b45d409f9009023623437 (patch) | |
tree | 0b352ce642e5cf54b2ccf83c4f11485e50bdadef /source/blender/editors/animation/anim_markers.c | |
parent | f8c52402d6c76392444a9dd9ab90d2f48b1a03fe (diff) |
UI: cleanup UI_fontstyle_string_width, UI_draw_string
Both were maked as temp, but used often.
Now pass uiFontStyle to both, rename UI_draw_string to UI_fontstyle_draw_simple,
since its a variant of UI_fontstyle_draw that skips shadow, align... etc.
Diffstat (limited to 'source/blender/editors/animation/anim_markers.c')
-rw-r--r-- | source/blender/editors/animation/anim_markers.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index b6c7a4aa5a0..d778b06cf5f 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -317,7 +317,7 @@ void debug_markers_print_list(ListBase *markers) /* function to draw markers */ static void draw_marker( - View2D *v2d, TimeMarker *marker, int cfra, int flag, + View2D *v2d, const uiFontStyle *fstyle, TimeMarker *marker, int cfra, int flag, /* avoid re-calculating each time */ const float ypixels, const float xscale, const float yscale) { @@ -399,13 +399,14 @@ static void draw_marker( } #endif - UI_draw_string(x, y, marker->name); + UI_fontstyle_draw_simple(fstyle, x, y, marker->name); } } /* Draw Scene-Markers in time window */ void ED_markers_draw(const bContext *C, int flag) { + const uiFontStyle *fstyle = UI_FSTYLE_WIDGET; ListBase *markers = ED_context_get_markers(C); View2D *v2d; TimeMarker *marker; @@ -455,7 +456,7 @@ void ED_markers_draw(const bContext *C, int flag) if ((marker->frame >= v2d_clip_range_x[0]) && (marker->frame <= v2d_clip_range_x[1])) { - draw_marker(v2d, marker, scene->r.cfra, flag, + draw_marker(v2d, fstyle, marker, scene->r.cfra, flag, ypixels, xscale, yscale); } } |