Fix icon alignment for pie buttons

This commit is contained in:
Aleksandr Zinovev 2017-03-11 22:34:09 +03:00
parent bcc8c04db4
commit 76015f98ae
Notes: blender-bot 2023-06-26 11:58:59 +02:00
Referenced by issue #50932, OpenGL depth picking - Bones with constraint need two RMB to be selected
1 changed files with 5 additions and 1 deletions

View File

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