diff options
author | Julian Eisel <julian@blender.org> | 2020-06-10 16:08:23 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-06-10 16:52:10 +0300 |
commit | d62bbf40793234a3cfc3762720f0964f85206169 (patch) | |
tree | 1aa1f7828ec6fcb4df01c484ab45ac78b9a5c624 /source/blender/editors/interface/interface_region_search.c | |
parent | 93c8955a722ba3f2022b92a2f8befaadc467756a (diff) |
UI: Show library names grayed out and right-aligned in menus
Should separate the data-block name better from the library name and improve
readability.
Diffstat (limited to 'source/blender/editors/interface/interface_region_search.c')
-rw-r--r-- | source/blender/editors/interface/interface_region_search.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_region_search.c b/source/blender/editors/interface/interface_region_search.c index 34bbb644ef7..68be08ef4f8 100644 --- a/source/blender/editors/interface/interface_region_search.c +++ b/source/blender/editors/interface/interface_region_search.c @@ -555,6 +555,7 @@ static void ui_searchbox_region_draw_cb(const bContext *C, ARegion *region) char *name = data->items.names[a]; int icon = data->items.icons[a]; char *name_sep_test = NULL; + const bool use_sep_char = data->use_sep || (state & UI_BUT_HAS_SEP_CHAR); ui_searchbox_butrect(&rect, data, a); @@ -563,7 +564,7 @@ static void ui_searchbox_region_draw_cb(const bContext *C, ARegion *region) !(name_sep_test = strstr(data->items.names[a], data->sep_string))) { /* Simple menu item. */ - ui_draw_menu_item(&data->fstyle, &rect, name, icon, state, data->use_sep, NULL); + ui_draw_menu_item(&data->fstyle, &rect, name, icon, state, use_sep_char, NULL); } else { /* Split menu item, faded text before the separator. */ @@ -590,7 +591,7 @@ static void ui_searchbox_region_draw_cb(const bContext *C, ARegion *region) /* The previous menu item draws the active selection. */ ui_draw_menu_item( - &data->fstyle, &rect, name_sep, icon, state & ~UI_ACTIVE, data->use_sep, NULL); + &data->fstyle, &rect, name_sep, icon, state & ~UI_ACTIVE, use_sep_char, NULL); } } /* indicate more */ |