diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-09-10 18:20:21 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-09-10 18:20:21 +0400 |
commit | cfb6f35f9fd2905b7d51b78258f98ab45d2c5ced (patch) | |
tree | 9c954266778cb7344dde5e01b77df335537f3dba /source/blender/editors/interface/interface_utils.c | |
parent | 15d77f17a40398a63f95e16607deb81257c02698 (diff) |
UI:
* layout.itemR now has icon_only option to show only icon
in e.g. enums buttons, for uv editor header.
* Automatic key shortcuts in menus now show the shortcut even if
operator properties don't match. Not sure this will work well
everywhere, but seems to be working ok for now.
* Open recent now show shorter filenames instead of the whole
file path.
* Tweak object Duplicate menu item.
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r-- | source/blender/editors/interface/interface_utils.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index 5b44f6544d1..63f81c9e46c 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -108,7 +108,12 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind but= uiDefButR(block, NUM, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); break; case PROP_ENUM: - but= uiDefButR(block, MENU, 0, NULL, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); + if(icon && name && strcmp(name, "") == 0) + but= uiDefIconButR(block, MENU, 0, icon, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); + else if(icon) + but= uiDefIconTextButR(block, MENU, 0, icon, NULL, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); + else + but= uiDefButR(block, MENU, 0, NULL, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); break; case PROP_STRING: if(icon && name && strcmp(name, "") == 0) |