WIP: Rewrite asset browser as separate editor #107576

Draft
Julian Eisel wants to merge 95 commits from asset-browser-frontend-split into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 7 additions and 1 deletions
Showing only changes of commit 06a5cd6e91 - Show all commits

View File

@ -4114,7 +4114,9 @@ static void widget_preview_tile(uiBut *but,
int roundboxalign,
const float zoom)
{
widget_list_itembut(wcol, rect, state, roundboxalign, zoom);
if (!ELEM(but->emboss, UI_EMBOSS_NONE, UI_EMBOSS_NONE_OR_STATUS)) {
widget_list_itembut(wcol, rect, state, roundboxalign, zoom);
}
ui_draw_preview_item_stateless(
&UI_style_get()->widget, rect, but->drawstr, but->icon, wcol->text, UI_STYLE_TEXT_CENTER);
@ -4685,6 +4687,9 @@ void ui_draw_but(const bContext *C, ARegion *region, uiStyle *style, uiBut *but,
but->drawflag |= UI_BUT_NO_TEXT_PADDING;
}
break;
case UI_BTYPE_PREVIEW_TILE:
wt = widget_type(UI_WTYPE_PREVIEW_TILE);
break;
default:
wt = widget_type(UI_WTYPE_ICON);
break;

View File

@ -413,6 +413,7 @@ void PreviewGridItem::build_grid_tile(uiLayout &layout) const
preview_icon_id,
/* NOLINTNEXTLINE: bugprone-suspicious-enum-usage */
UI_HAS_ICON | UI_BUT_ICON_PREVIEW);
but->emboss = UI_EMBOSS_NONE;
}
void PreviewGridItem::set_on_activate_fn(ActivateFn fn)