forked from bartvdbraak/blender
UI: Fix for icon-only menus too small click-able area
This commit is contained in:
parent
a71f072f9c
commit
029a7bbade
@ -760,9 +760,7 @@ class Menu(StructRNA, _GenericUI, metaclass=RNAMeta):
|
||||
if context.area.show_menus:
|
||||
cls.draw_menus(layout, context)
|
||||
else:
|
||||
layout.separator()
|
||||
layout.menu(cls.__name__, icon='COLLAPSEMENU')
|
||||
layout.separator()
|
||||
|
||||
|
||||
class Region(StructRNA):
|
||||
|
@ -1619,10 +1619,14 @@ static void ui_item_menu(uiLayout *layout, const char *name, int icon, uiMenuCre
|
||||
h = UI_UNIT_Y;
|
||||
|
||||
if (layout->root->type == UI_LAYOUT_HEADER) { /* ugly .. */
|
||||
if (force_menu)
|
||||
if (force_menu) {
|
||||
w += UI_UNIT_Y;
|
||||
else
|
||||
w -= UI_UNIT_Y / 2;
|
||||
}
|
||||
else {
|
||||
if (name[0]) {
|
||||
w -= UI_UNIT_Y / 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (name[0] && icon)
|
||||
|
Loading…
Reference in New Issue
Block a user