Show asset name in tooltip, add a small gap before catalog tabs

This commit is contained in:
Julian Eisel 2023-02-03 15:50:22 +01:00
parent 002158c26f
commit baf45e1ac8
2 changed files with 6 additions and 2 deletions

View File

@ -488,6 +488,8 @@ static void asset_shelf_footer_draw(const bContext *C, Header *header)
UI_UNIT_Y,
TIP_("Select catalogs to display"));
uiItemS(layout);
AssetShelfSettings *shelf_settings = get_asset_shelf_settings_from_context(C);
if (shelf_settings) {
add_catalog_toggle_buttons(*shelf_settings, *layout);

View File

@ -66,11 +66,13 @@ static void asset_tile_draw(uiLayout &layout,
uiLayoutSetContextPointer(&layout, "active_file", &file_ptr);
uiBlock *block = uiLayoutGetBlock(&layout);
const StringRefNull name = ED_asset_handle_get_name(&asset_handle);
uiBut *but = uiDefIconTextBut(block,
UI_BTYPE_PREVIEW_TILE,
0,
ED_asset_handle_get_preview_icon_id(&asset_handle),
show_names ? ED_asset_handle_get_name(&asset_handle) : "",
show_names ? name.c_str() : "",
0,
0,
width,
@ -80,7 +82,7 @@ static void asset_tile_draw(uiLayout &layout,
0,
0,
0,
"");
name.c_str());
ui_def_but_icon(but,
ED_asset_handle_get_preview_icon_id(&asset_handle),
/* NOLINTNEXTLINE: bugprone-suspicious-enum-usage */