diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-30 18:49:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-30 18:49:58 +0300 |
commit | 4d6584ba6a22d4c06cb5e5ecce38dded1247da3f (patch) | |
tree | 91ee28e7f2521d87941dba61e87aedc171b80d0e /source/blender/makesrna | |
parent | 5ced6cb2bc52a50365e4bc4003994c39cdcb895f (diff) |
UI: use enum for thumbnail size
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 4f54a6f07dc..b02c69c54ef 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -3698,6 +3698,14 @@ static void rna_def_fileselect_params(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; + static EnumPropertyItem thumbnail_size_items[] = { + {32, "TINY", 0, "Tiny", ""}, + {64, "SMALL", 0, "Small", ""}, + {128, "NORMAL", 0, "Normal", ""}, + {256, "LARGE", 0, "Large", ""}, + {0, NULL, 0, NULL, NULL} + }; + srna = RNA_def_struct(brna, "FileSelectParams", NULL); RNA_def_struct_ui_text(srna, "File Select Parameters", "File Select Parameters"); @@ -3803,9 +3811,9 @@ static void rna_def_fileselect_params(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_TEXTEDIT_UPDATE); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_FILE_LIST, NULL); - prop = RNA_def_property(srna, "thumbnails_size", PROP_INT, PROP_PIXEL); - RNA_def_property_int_sdna(prop, NULL, "thumbnails_size"); - RNA_def_property_range(prop, 32, 256); + prop = RNA_def_property(srna, "thumbnail_size", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "thumbnail_size"); + RNA_def_property_enum_items(prop, thumbnail_size_items); RNA_def_property_ui_text(prop, "Thumbnails Size", "Change the size of the thumbnails"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_FILE_LIST, NULL); } |