UI: small tweak to tooltips for enum menus, it wasn't very clear which
description was for the property and which for the item.
This commit is contained in:
@@ -61,8 +61,8 @@ include_directories(
|
|||||||
# Subdirectories
|
# Subdirectories
|
||||||
|
|
||||||
if(WITH_CYCLES_BLENDER)
|
if(WITH_CYCLES_BLENDER)
|
||||||
add_subdirectory(blender)
|
|
||||||
add_definitions(-DBLENDER_PLUGIN)
|
add_definitions(-DBLENDER_PLUGIN)
|
||||||
|
add_subdirectory(blender)
|
||||||
endif(WITH_CYCLES_BLENDER)
|
endif(WITH_CYCLES_BLENDER)
|
||||||
|
|
||||||
add_subdirectory(app)
|
add_subdirectory(app)
|
||||||
|
@@ -2618,11 +2618,8 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s
|
|||||||
else
|
else
|
||||||
BLI_dynstr_appendf(dynstr, "|%s %%x%d", item[i].name, item[i].value);
|
BLI_dynstr_appendf(dynstr, "|%s %%x%d", item[i].name, item[i].value);
|
||||||
|
|
||||||
if(value == item[i].value) {
|
if(value == item[i].value)
|
||||||
icon= item[i].icon;
|
icon= item[i].icon;
|
||||||
if(!tip)
|
|
||||||
tip= item[i].description;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
str= BLI_dynstr_get_cstring(dynstr);
|
str= BLI_dynstr_get_cstring(dynstr);
|
||||||
BLI_dynstr_free(dynstr);
|
BLI_dynstr_free(dynstr);
|
||||||
|
@@ -376,7 +376,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
|
|||||||
data->totline++;
|
data->totline++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(but->type == ROW) {
|
if(ELEM(but->type, ROW, MENU)) {
|
||||||
EnumPropertyItem *item;
|
EnumPropertyItem *item;
|
||||||
int i, totitem, free;
|
int i, totitem, free;
|
||||||
|
|
||||||
@@ -386,7 +386,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
|
|||||||
if(item[i].identifier[0] && item[i].value == (int)but->hardmax) {
|
if(item[i].identifier[0] && item[i].value == (int)but->hardmax) {
|
||||||
if(item[i].description[0]) {
|
if(item[i].description[0]) {
|
||||||
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "%s: %s", item[i].name, item[i].description);
|
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "%s: %s", item[i].name, item[i].description);
|
||||||
data->color[data->totline]= 0xFFFFFF;
|
data->color[data->totline]= 0xDDDDDD;
|
||||||
data->totline++;
|
data->totline++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user