From 09eec627ed730532905b45d409f9009023623437 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 20 Jan 2015 14:25:39 +1100 Subject: 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. --- source/blender/editors/interface/interface_eyedropper.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/interface/interface_eyedropper.c') diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c index 9b5d067e9be..dfcafd7e46e 100644 --- a/source/blender/editors/interface/interface_eyedropper.c +++ b/source/blender/editors/interface/interface_eyedropper.c @@ -73,10 +73,11 @@ static void eyedropper_draw_cursor_text(const struct bContext *C, ARegion *ar, const char *name) { - int width; + const uiFontStyle *fstyle = UI_FSTYLE_WIDGET; wmWindow *win = CTX_wm_window(C); int x = win->eventstate->x; int y = win->eventstate->y; + int width; if ((name[0] == '\0') || (BLI_rcti_isect_pt(&ar->winrct, x, y) == false)) @@ -84,7 +85,7 @@ static void eyedropper_draw_cursor_text(const struct bContext *C, ARegion *ar, c return; } - width = UI_fontstyle_string_width(name); + width = UI_fontstyle_string_width(fstyle, name); x = x - ar->winrct.xmin; y = y - ar->winrct.ymin; @@ -96,7 +97,7 @@ static void eyedropper_draw_cursor_text(const struct bContext *C, ARegion *ar, c UI_draw_roundbox(x, y, x + width + 8, y + 15, 4); glColor4ub(255, 255, 255, 255); - UI_draw_string(x + 4, y + 4, name); + UI_fontstyle_draw_simple(fstyle, x + 4, y + 4, name); } /** \} */ -- cgit v1.2.3