diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-06-19 19:08:07 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-06-19 19:08:07 +0400 |
commit | 30a108ddad253c58b87615d3106bd9bfeecb1775 (patch) | |
tree | e1ab9d2de880f8272c0ae4ba63f6f286df32771c | |
parent | 5a4e36c05184271194bd7fbf5afc49224c40fa45 (diff) |
Fix for expanded enums with icon_only enabled, name of each item was still used to compute its button's size!
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index b6575f4eca0..ef839f1d143 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -525,7 +525,7 @@ static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *pt name = (!uiname || uiname[0]) ? item->name : ""; icon = item->icon; value = item->value; - itemw = ui_text_icon_width(block->curlayout, name, icon, 0); + itemw = ui_text_icon_width(block->curlayout, icon_only ? "" : name, icon, 0); if (icon && name[0] && !icon_only) but = uiDefIconTextButR_prop(block, ROW, 0, icon, name, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL); |