diff options
author | Hans Goudey <h.goudey@me.com> | 2020-09-15 18:34:38 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-09-15 18:34:38 +0300 |
commit | f59ce4d55c04a61a10d9e9567b53ee652972b60a (patch) | |
tree | b76be15c2f4714f166ed7c3bd9588123ceee35f6 /source | |
parent | 6b29c3fa07f54a0b0d123a90049fbad36a1334c2 (diff) |
Property Search: Add "search match" theme color
We will use a highlight on panel headers to convey that they have
a search match, so this commit initializes the theme color for the
properties editor.
Differential Revision: https://developer.blender.org/D8854
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/versioning_userdef.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index 955725f0ea7..a0a60630986 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -236,6 +236,8 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme) */ { /* Keep this block, even when empty. */ + + FROM_DEFAULT_V4_UCHAR(space_properties.match); } #undef FROM_DEFAULT_V4_UCHAR diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 1ecd0a581b6..868c804b4a3 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2952,7 +2952,7 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna) static void rna_def_userdef_theme_space_buts(BlenderRNA *brna) { StructRNA *srna; - // PropertyRNA *prop; + PropertyRNA *prop; /* space_buts */ @@ -2961,6 +2961,11 @@ static void rna_def_userdef_theme_space_buts(BlenderRNA *brna) RNA_def_struct_clear_flag(srna, STRUCT_UNDO); RNA_def_struct_ui_text(srna, "Theme Properties", "Theme settings for the Properties"); + prop = RNA_def_property(srna, "match", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Search Match", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + rna_def_userdef_theme_spaces_main(srna); } |