UI: Transparency Checkerboard behind File Browser Thumbnails
For thumbnails of image file types in the File Browser use the checkerboard pattern as background to help indicate that the image could contain transparency. Pull Request: https://projects.blender.org/blender/blender/pulls/108554
This commit is contained in:
committed by
Harley Acheson
parent
221f985129
commit
e9e12015ea
@@ -417,6 +417,11 @@ static void file_draw_preview(const FileList *files,
|
||||
document_img_col[3] *= 0.3f;
|
||||
}
|
||||
|
||||
if (!is_icon && file->typeflag & FILE_TYPE_IMAGE) {
|
||||
/* Draw checker pattern behind image previews in case they have transparency. */
|
||||
imm_draw_box_checker_2d(float(xco), float(yco), float(xco + ex), float(yco + ey));
|
||||
}
|
||||
|
||||
if (!is_icon && file->typeflag & FILE_TYPE_BLENDERLIB) {
|
||||
/* Datablock preview images use premultiplied alpha. */
|
||||
GPU_blend(GPU_BLEND_ALPHA_PREMULT);
|
||||
|
||||
Reference in New Issue
Block a user