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/interface/interface_eyedropper.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/interface/interface_eyedropper.c')
-rw-r--r-- | source/blender/editors/interface/interface_eyedropper.c | 7 |
1 files changed, 4 insertions, 3 deletions
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); } /** \} */ |