From 029a7bbade920385a4852484cc19b138be8a9558 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 27 Jan 2014 19:10:53 +1100 Subject: UI: Fix for icon-only menus too small click-able area --- source/blender/editors/interface/interface_layout.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/interface') diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 34c124b293e..d2099334efb 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -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) -- cgit v1.2.3