Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r--source/blender/editors/interface/interface_utils.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index cb6cc5dcacf..a8cd0e017ed 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -69,11 +69,10 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
else
value= RNA_property_boolean_get(ptr, prop);
- // XXX: when to do TOG, and when to do ICONTOG? for now, let's just do TOG, since ICONTOG causes too much trouble everywhere else
if(icon && name && strcmp(name, "") == 0)
- but= uiDefIconButR(block, TOG, 0, icon, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
+ but= uiDefIconButR(block, ICONTOG, 0, icon, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
else if(icon)
- but= uiDefIconTextButR(block, TOG, 0, icon, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
+ but= uiDefIconTextButR(block, ICONTOG, 0, icon, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
else
but= uiDefButR(block, OPTION, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
break;
@@ -81,7 +80,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
case PROP_INT:
case PROP_FLOAT:
if(arraylen && index == -1) {
- if(RNA_property_subtype(prop) == PROP_COLOR)
+ if(ELEM(RNA_property_subtype(prop), PROP_COLOR, PROP_COLOR_GAMMA))
but= uiDefButR(block, COL, 0, name, x1, y1, x2, y2, ptr, propname, 0, 0, 0, -1, -1, NULL);
}
else if(RNA_property_subtype(prop) == PROP_PERCENTAGE || RNA_property_subtype(prop) == PROP_FACTOR)
@@ -152,7 +151,7 @@ void uiDefAutoButsRNA(const bContext *C, uiLayout *layout, PointerRNA *ptr, int
uiItemL(col, name, 0);
}
else if(columns == 2) {
- split = uiLayoutSplit(layout, 0.5f);
+ split = uiLayoutSplit(layout, 0.5f, 0);
uiItemL(uiLayoutColumn(split, 0), name, 0);
col= uiLayoutColumn(split, 0);