Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / interface / interface_widgets.c
index 8e3bdd2a5da506e759d6815df51a5a36493d8898..16aa16ccc5d5ffa780c4aa593ee990404b570f1e 100644 (file)
@@ -903,15 +903,18 @@ static void widget_draw_icon(
        if (icon && icon != ICON_BLANK1) {
                float ofs = 1.0f / aspect;
                
-               if (but->drawflag & UI_BUT_ICON_LEFT || ui_block_is_pie_menu(but->block)) {
+               if (but->drawflag & UI_BUT_ICON_LEFT) {
                        if (but->block->flag & UI_BLOCK_LOOP) {
                                if (but->type == UI_BTYPE_SEARCH_MENU)
                                        xs = rect->xmin + 4.0f * ofs;
                                else
-                                       xs = rect->xmin + 2.0f * ofs;
+                                       xs = rect->xmin + ofs;
                        }
                        else {
-                               xs = rect->xmin + 2.0f * ofs;
+                               if (but->dt == UI_EMBOSS_NONE || but->type == UI_BTYPE_LABEL)
+                                       xs = rect->xmin + 2.0f * ofs;
+                               else
+                                       xs = rect->xmin + 4.0f * ofs;
                        }
                        ys = (rect->ymin + rect->ymax - height) / 2.0f;
                }