UI: Size Range of Preview Thumbnails #108557

Closed
Harley Acheson wants to merge 3 commits from Harley/blender:ThumbnailTiny into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
4 changed files with 10 additions and 6 deletions

View File

@ -214,7 +214,7 @@ const UserDef U_default = {
.file_space_data =
{
.display_type = FILE_VERTICALDISPLAY,
.thumbnail_size = 128,
.thumbnail_size = 96,
.sort_type = FILE_SORT_ALPHA,
.details_flags = FILE_DETAILS_SIZE | FILE_DETAILS_DATETIME,
.flag = FILE_HIDE_DOT,

View File

@ -524,7 +524,9 @@ static void file_draw_preview(const FileList *files,
UI_NO_ICON_OVERLAY_TEXT);
}
}
else if (icon && ((!is_icon && !(file->typeflag & FILE_TYPE_FTFONT)) || is_loading)) {
else if (icon && layout->curr_size >= 64 &&
((!is_icon && !(file->typeflag & FILE_TYPE_FTFONT)) || is_loading))
{
/* Smaller, fainter icon at bottom-left for preview image thumbnail, but not for fonts. */
float icon_x, icon_y;
const uchar dark[4] = {0, 0, 0, 255};

View File

@ -124,7 +124,7 @@ static void fileselect_ensure_updated_asset_params(SpaceFile *sfile)
base_params->sort = FILE_SORT_ALPHA;
/* Asset libraries include all sub-directories, so enable maximal recursion. */
base_params->recursion_level = FILE_SELECT_MAX_RECURSIONS;
/* 'SMALL' size by default. More reasonable since this is typically used as regular editor,
/* 'NORMAL' size by default. More reasonable since this is typically used as regular editor,
* space is more of an issue here. */
base_params->thumbnail_size = 96;

View File

@ -6740,10 +6740,12 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
};
static const EnumPropertyItem display_size_items[] = {
{64, "TINY", 0, "Tiny", ""},
{96, "SMALL", 0, "Small", ""},
{128, "NORMAL", 0, "Medium", ""},
{32, "TINY", 0, "Tiny", ""},
{64, "SMALL", 0, "Small", ""},
{96, "NORMAL", 0, "Medium", ""},
{128, "BIG", 0, "Big", ""},
{192, "LARGE", 0, "Large", ""},
{256, "HUGE", 0, "Huge", ""},
{0, nullptr, 0, nullptr, nullptr},
};