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:
Harley Acheson
2018-12-11 11:23:13 +01:00
committed by Brecht Van Lommel
parent 4bf2530952
commit 73b19bfb27

View File

@@ -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);