UI: Popover Button Padding for Arrow

Currently UI_BTYPE_POPOVER with icon and without text will get enough
extra padding to fit a downward arrow, only if in a header region. This
PR allows it to get the same padding in other areas when "force_menu"
is true.

Pull Request: https://projects.blender.org/blender/blender/pulls/119181
This commit is contained in:
Harley Acheson
2024-03-07 22:01:56 +01:00
committed by Harley Acheson
parent daf3512a51
commit aa328e898e

View File

@@ -2994,7 +2994,8 @@ static uiBut *ui_item_menu(uiLayout *layout,
}
uiTextIconPadFactor pad_factor = ui_text_pad_compact;
if (layout->root->type == UI_LAYOUT_HEADER) { /* Ugly! */
/* Ugly! Extra padding in specific circumstances. */
if (layout->root->type == UI_LAYOUT_HEADER || force_menu) {
if (icon == ICON_NONE && force_menu) {
/* pass */
}