UI: Fix Minimum File Type Icon Size in File Browser

File browser can now show thumbnail view in a larger range of sizes.
Unfortunately there is a lower bound currently set on the icon that is
shown in the middle of the "document" that assumes 64 is the smallest
(the old minimum). This causes these icons to overflow below 64. Just
something that was missed when we allowed smaller sizes. This small
change supports down to 16.

Pull Request: https://projects.blender.org/blender/blender/pulls/122811
This commit is contained in:
Harley Acheson
2024-06-22 01:30:49 +02:00
committed by Harley Acheson
parent 9d8a90d53c
commit 3229bde954

View File

@@ -1145,7 +1145,7 @@ void file_draw_list(const bContext *C, ARegion *region)
bool do_drag;
uchar text_col[4];
const bool draw_columnheader = (params->display == FILE_VERTICALDISPLAY);
const float thumb_icon_aspect = std::min(64.0f / float(params->thumbnail_size), 1.0f);
const float thumb_icon_aspect = std::min(64.0f / float(params->thumbnail_size), 2.0f);
numfiles = filelist_files_ensure(files);