Fix icon alignment for pie buttons

This commit is contained in:
raa 2017-03-11 22:34:09 +03:00
parent bcc8c04db4
commit 76015f98ae

@ -1558,7 +1558,11 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
/* menu item - add some more padding so menus don't feel cramped. it must
* be part of the button so that this area is still clickable */
if (ui_block_is_menu(but->block) && !ui_block_is_pie_menu(but->block))
if (ui_block_is_pie_menu(but->block)) {
if (but->dt == UI_EMBOSS_RADIAL)
rect->xmin += 0.3f * U.widget_unit;
}
else if (ui_block_is_menu(but->block))
rect->xmin += 0.3f * U.widget_unit;
widget_draw_icon(but, icon, alpha, rect, show_menu_icon);