New 'icon_only' wasn't actually exposed in the ui api, causing errors in the py scripts, so I added it to ItemR. Also reverted Joshua's temporary fix, which didn't seem to help much and was making the render engine menu too small.

This commit is contained in:
2009-09-13 22:33:47 +00:00
parent a4532b202b
commit 492f6589c4

View File

@@ -37,17 +37,15 @@
#ifdef RNA_RUNTIME
static void rna_uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *propname, int expand, int slider, int toggle)
static void rna_uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *propname, int expand, int slider, int toggle, int icon_only)
{
int flag= 0;
flag |= (slider)? UI_ITEM_R_SLIDER: 0;
flag |= (expand)? UI_ITEM_R_EXPAND: 0;
flag |= (toggle)? UI_ITEM_R_TOGGLE: 0;
flag |= (icon_only)? UI_ITEM_R_ICON_ONLY: 0;
// XXX: an 'icon_only' prop should be added instead, but for now, this makes ptrs look ok
flag |= (name && name[0]==0)? UI_ITEM_R_ICON_ONLY: 0;
uiItemR(layout, name, icon, ptr, propname, flag);
}
@@ -148,6 +146,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
RNA_def_boolean(func, "slider", 0, "", "Use slider widget for numeric values.");
RNA_def_boolean(func, "toggle", 0, "", "Use toggle widget for boolean values.");
RNA_def_boolean(func, "icon_only", 0, "", "Only show the property's icon, with no text");
func= RNA_def_function(srna, "items_enumR", "uiItemsEnumR");
api_ui_item_rna_common(func);