Fix: Asset shelf quick tooltips not showing
Since 4a9e8087a7, preview-tile buttons are non-interactive by default,
so tooltip handling is not triggered. Instead, attach the tooltip to the
underlying view-item button.
This commit is contained in:
@@ -484,6 +484,8 @@ void PreviewGridItem::build_grid_tile_button(uiLayout &layout,
|
||||
WM_OP_INVOKE_REGION_WIN,
|
||||
op_props);
|
||||
}
|
||||
UI_but_func_tooltip_label_set(this->view_item_button(),
|
||||
[this](const uiBut * /*but*/) { return label; });
|
||||
|
||||
uiBut *but = uiDefBut(block,
|
||||
UI_BTYPE_PREVIEW_TILE,
|
||||
@@ -508,7 +510,6 @@ void PreviewGridItem::build_grid_tile_button(uiLayout &layout,
|
||||
preview_icon_id,
|
||||
/* NOLINTNEXTLINE: bugprone-suspicious-enum-usage */
|
||||
UI_HAS_ICON | is_preview_flag);
|
||||
UI_but_func_tooltip_label_set(but, [this](const uiBut * /*but*/) { return label; });
|
||||
but->emboss = UI_EMBOSS_NONE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user