UI: fix enum icon buttons haveing different size.
The alignment makes it so the button edges overlap, now one pixel is removed to account for this. Differential Revision: https://developer.blender.org/D4063
This commit is contained in:
@@ -721,7 +721,7 @@ static void ui_item_enum_expand_exec(
|
||||
if (icon && name[0] && !icon_only)
|
||||
but = uiDefIconTextButR_prop(block, but_type, 0, icon, name, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
|
||||
else if (icon)
|
||||
but = uiDefIconButR_prop(block, but_type, 0, icon, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
|
||||
but = uiDefIconButR_prop(block, but_type, 0, icon, 0, 0, (is_first) ? itemw : itemw - UI_DPI_FAC, h, ptr, prop, -1, 0, value, -1, -1, NULL);
|
||||
else
|
||||
but = uiDefButR_prop(block, but_type, 0, name, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
|
||||
|
||||
|
Reference in New Issue
Block a user