diff options
author | Harley Acheson <harley> | 2018-12-11 13:23:13 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-12-11 22:46:39 +0300 |
commit | 73b19bfb2756ff562eb936f5a1a30172e85fca6c (patch) | |
tree | a5cbf2f2a3fca889b6f9a9090dc5106347371352 /source/blender | |
parent | 4bf2530952c0c772f42595fa79a2c0a9a7559314 (diff) |
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
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 8a27fd55d37..c0706ed8450 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -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); |