[Bf-blender-cvs] [81f29678dcd] master: UI: fix display of menu buttons without text and icon, and only a down arrow.
Harley Acheson
noreply at git.blender.org
Fri Jan 4 15:29:40 CET 2019
Commit: 81f29678dcd733ac0a210a2a9d2ac48b06e60daa
Author: Harley Acheson
Date: Fri Jan 4 15:08:47 2019 +0100
Branches: master
https://developer.blender.org/rB81f29678dcd733ac0a210a2a9d2ac48b06e60daa
UI: fix display of menu buttons without text and icon, and only a down arrow.
Differential Revision: https://developer.blender.org/D4123
===================================================================
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 0c94705bb1f..e6c3d968a27 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -291,6 +291,9 @@ static int ui_text_icon_width(uiLayout *layout, const char *name, int icon, bool
variable = ui_layout_variable_size(layout);
if (variable) {
+ if (!icon && !name[0]) {
+ return unit_x; /* No icon or name. */
+ }
if (layout->alignment != UI_LAYOUT_ALIGN_EXPAND) {
layout->item.flag |= UI_ITEM_MIN;
}
More information about the Bf-blender-cvs
mailing list