diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-04-14 11:46:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-04-14 11:50:28 +0300 |
commit | e6d9d5dcc18f3ab55c31abc6bfb2010081538422 (patch) | |
tree | 99c6315d9612d81f4b9c34a72674bb702f64ceda /source/blender/editors/interface/interface_style.c | |
parent | 571646ebc175877225c26a3dcf8869691cf70ba7 (diff) |
UI: improve menu search with dimmed menu prefix
- Show dimmed text for the menu entries leading up to the menu item.
- Show icons between the menu text and menu item.
- Use unicode right pointing triangle instead of arrow.
Diffstat (limited to 'source/blender/editors/interface/interface_style.c')
-rw-r--r-- | source/blender/editors/interface/interface_style.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index a67d4f4ce83..d14c9e69e55 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -148,7 +148,8 @@ void UI_fontstyle_draw_ex(const uiFontStyle *fs, const struct uiFontStyleDraw_Params *fs_params, size_t len, int *r_xofs, - int *r_yofs) + int *r_yofs, + struct ResultBLF *r_info) { int xofs = 0, yofs; int font_flag = BLF_CLIPPING; @@ -196,7 +197,7 @@ void UI_fontstyle_draw_ex(const uiFontStyle *fs, BLF_position(fs->uifont_id, rect->xmin + xofs, rect->ymin + yofs, 0.0f); BLF_color4ubv(fs->uifont_id, col); - BLF_draw(fs->uifont_id, str, len); + BLF_draw_ex(fs->uifont_id, str, len, r_info); BLF_disable(fs->uifont_id, font_flag); @@ -212,7 +213,7 @@ void UI_fontstyle_draw(const uiFontStyle *fs, { int xofs, yofs; - UI_fontstyle_draw_ex(fs, rect, str, col, fs_params, BLF_DRAW_STR_DUMMY_MAX, &xofs, &yofs); + UI_fontstyle_draw_ex(fs, rect, str, col, fs_params, BLF_DRAW_STR_DUMMY_MAX, &xofs, &yofs, NULL); } /* drawn same as above, but at 90 degree angle */ |