Commit: e07b58537c05b4370cd0773cc1d63084e4c4a20a Author: Harley Acheson Date: Thu Dec 27 12:48:00 2018 +0100 Branches: master https://developer.blender.org/rBe07b58537c05b4370cd0773cc1d63084e4c4a20a
UI: fix inconsistent icon button widths for popovers and enums. Differential Revision: https://developer.blender.org/D4086 =================================================================== M source/blender/editors/interface/interface_layout.c =================================================================== diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 9b145fdba92..87927ef7643 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -2228,7 +2228,7 @@ static uiBut *ui_item_menu( /* pass */ } else if (force_menu) { - w += UI_UNIT_X; + w += 0.6f * UI_UNIT_X; } else { if (name[0]) { @@ -2237,12 +2237,16 @@ static uiBut *ui_item_menu( } } - if (name[0] && icon) + if (name[0] && icon) { but = uiDefIconTextMenuBut(block, func, arg, icon, name, 0, 0, w, h, tip); - else if (icon) + } + else if (icon) { but = uiDefIconMenuBut(block, func, arg, icon, 0, 0, w, h, tip); - else + UI_but_drawflag_enable(but, UI_BUT_ICON_LEFT); + } + else { but = uiDefMenuBut(block, func, arg, name, 0, 0, w, h, tip); + } if (argN) { /* ugly .. */ _______________________________________________ Bf-blender-cvs mailing list [email protected] https://lists.blender.org/mailman/listinfo/bf-blender-cvs
