Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-04-29 22:25:34 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-04-29 22:30:33 +0300
commit054aa61f3c9af0997cbb0ecf89f73227723a24cd (patch)
tree12633d0b7c8727a645050fc852efa028456c893b /source/blender/editors/space_file/filesel.c
parent3de45ee7fe451ab4267b824a569a2173660d2575 (diff)
File browser - change thumbnails size with a slider
We can now scale from 32px up to 256px (default has been upgraded to 128px). Thumbnails are now generated as 'large', i.e. 256px. Previews are scaled up if necessary, unlike icons (for folders or files without preview images). Note that .blend thumbnails themselves remain in 128px for now (they are embeded in .blend files, not quite sure we want to make them four times bigger...). Patch by DMS (Yaron Dames), with final edits by myself. Reviewers: mont29 Subscribers: Severin, mont29 Differential Revision: https://developer.blender.org/D1260
Diffstat (limited to 'source/blender/editors/space_file/filesel.c')
-rw-r--r--source/blender/editors/space_file/filesel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 6858f536e92..d89e55cb55f 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -102,6 +102,8 @@ short ED_fileselect_set_params(SpaceFile *sfile)
/* set path to most recently opened .blend */
BLI_split_dirfile(G.main->name, sfile->params->dir, sfile->params->file, sizeof(sfile->params->dir), sizeof(sfile->params->file));
sfile->params->filter_glob[0] = '\0';
+ /* set the default thumbnails size */
+ sfile->params->thumbnails_size = 128;
}
params = sfile->params;
@@ -527,8 +529,8 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *ar)
layout->textheight = textheight;
if (params->display == FILE_IMGDISPLAY) {
- layout->prv_w = 4.8f * UI_UNIT_X;
- layout->prv_h = 4.8f * UI_UNIT_Y;
+ layout->prv_w = ((float)params->thumbnails_size / 20.0f) * UI_UNIT_X;
+ layout->prv_h = ((float)params->thumbnails_size / 20.0f) * UI_UNIT_Y;
layout->tile_border_x = 0.3f * UI_UNIT_X;
layout->tile_border_y = 0.3f * UI_UNIT_X;
layout->prv_border_x = 0.3f * UI_UNIT_X;