diff options
Diffstat (limited to 'source/blender/editors/space_file/file_draw.c')
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index dff32a5f0d5..31326e2c18d 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -341,6 +341,7 @@ static void file_draw_preview( float scale; int ex, ey; bool use_dropshadow = !is_icon && (typeflags & FILE_TYPE_IMAGE); + float col[4] = {1.0f, 1.0f, 1.0f, 1.0f}; BLI_assert(imb != NULL); @@ -387,12 +388,11 @@ static void file_draw_preview( /* the image */ if (!is_icon && typeflags & FILE_TYPE_FTFONT) { - UI_ThemeColor(TH_TEXT); + UI_GetThemeColor4fv(TH_TEXT, col); } - else { - glColor4f(1.0, 1.0, 1.0, 1.0); - } - glaDrawPixelsTexScaled((float)xco, (float)yco, imb->x, imb->y, GL_RGBA, GL_UNSIGNED_BYTE, GL_NEAREST, imb->rect, scale, scale); + + immDrawPixelsTexScaled((float)xco, (float)yco, imb->x, imb->y, GL_RGBA, GL_UNSIGNED_BYTE, GL_NEAREST, imb->rect, + scale, scale, 1.0f, 1.0f, col); if (icon) { UI_icon_draw_aspect((float)xco, (float)yco, icon, icon_aspect, 1.0f); |