diff options
author | Ton Roosendaal <ton@blender.org> | 2012-12-15 20:22:18 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2012-12-15 20:22:18 +0400 |
commit | 695468a3b9a54dc2f26b2aac7c48d6d066f80b3d (patch) | |
tree | 2bc4287465ca19a682c0dc503b4d7dcba1562c7b /source/blender/makesrna/intern/rna_userdef.c | |
parent | c26746ccec8f7513cc28612842dc4033dddaa91d (diff) |
Finished themes for transparent Button regions in Blender.
Notes and image:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability
- now each editor has own settings for "show panel header" and
"show panel background", and colors+alpha for this.
- this setting used to be global for all editors, but it can conflict
with looks of specific editors.
- Now you can set for editors to show panels with a 100% transparent
tool/properties region.
Note: read XML theme files now might get an error, Campbell will fix.
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 79 |
1 files changed, 44 insertions, 35 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index d24ddcdaef2..c0467a43222 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -504,12 +504,12 @@ static void rna_def_userdef_theme_ui_style(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Panel Zoom", "Default zoom level for panel areas"); #endif - prop = RNA_def_property(srna, "panel_title", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "paneltitle"); - RNA_def_property_struct_type(prop, "ThemeFontStyle"); - RNA_def_property_ui_text(prop, "Panel Style", ""); - RNA_def_property_update(prop, 0, "rna_userdef_update"); +// prop = RNA_def_property(srna, "panel_title", PROP_POINTER, PROP_NONE); +// RNA_def_property_flag(prop, PROP_NEVER_NULL); +// RNA_def_property_pointer_sdna(prop, NULL, "paneltitle"); +// RNA_def_property_struct_type(prop, "ThemeFontStyle"); +// RNA_def_property_ui_text(prop, "Panel Style", ""); +// RNA_def_property_update(prop, 0, "rna_userdef_update"); /* (not used yet) */ #if 0 @@ -650,10 +650,18 @@ static void rna_def_userdef_theme_ui_panel(BlenderRNA *brna) prop = RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_ui_text(prop, "Header", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); - + + prop = RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_ui_text(prop, "Background", ""); + RNA_def_property_update(prop, 0, "rna_userdef_update"); + prop = RNA_def_property(srna, "show_header", PROP_BOOLEAN, PROP_NONE); RNA_def_property_ui_text(prop, "Show Header", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); + + prop = RNA_def_property(srna, "show_back", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_ui_text(prop, "Show Background", ""); + RNA_def_property_update(prop, 0, "rna_userdef_update"); } static void rna_def_userdef_theme_ui(BlenderRNA *brna) @@ -759,11 +767,6 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna) RNA_def_property_ui_text(prop, "State Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); - prop = RNA_def_property(srna, "panel", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_ui_text(prop, "Panel Colors", ""); - RNA_def_property_update(prop, 0, "rna_userdef_update"); - prop = RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "iconfile"); RNA_def_property_ui_text(prop, "Icon File", ""); @@ -839,6 +842,12 @@ static void rna_def_userdef_theme_space_generic(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Header Text Highlight", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); + /* panel settings */ + prop = RNA_def_property(srna, "panelcolors", PROP_POINTER, PROP_NONE); + RNA_def_property_flag(prop, PROP_NEVER_NULL); + RNA_def_property_ui_text(prop, "Panel Colors", ""); + RNA_def_property_update(prop, 0, "rna_userdef_update"); + /* buttons */ /* if (! ELEM(spacetype, SPACE_BUTS, SPACE_OUTLINER)) { */ prop = RNA_def_property(srna, "button", PROP_FLOAT, PROP_COLOR_GAMMA); @@ -1116,10 +1125,10 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Grid", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); - prop = RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_array(prop, 4); - RNA_def_property_ui_text(prop, "Panel", ""); - RNA_def_property_update(prop, 0, "rna_userdef_update"); +// prop = RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA); +// RNA_def_property_array(prop, 4); +// RNA_def_property_ui_text(prop, "Panel", ""); +// RNA_def_property_update(prop, 0, "rna_userdef_update"); prop = RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); @@ -1275,10 +1284,10 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Grid", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); - prop = RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Panel", ""); - RNA_def_property_update(prop, 0, "rna_userdef_update"); +// prop = RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA); +// RNA_def_property_array(prop, 3); +// RNA_def_property_ui_text(prop, "Panel", ""); +// RNA_def_property_update(prop, 0, "rna_userdef_update"); prop = RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "shade1"); @@ -1362,11 +1371,11 @@ static void rna_def_userdef_theme_space_file(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Selected File", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); - prop = RNA_def_property(srna, "tiles", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "panel"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Tiles", ""); - RNA_def_property_update(prop, 0, "rna_userdef_update"); +// prop = RNA_def_property(srna, "tiles", PROP_FLOAT, PROP_COLOR_GAMMA); +// RNA_def_property_float_sdna(prop, NULL, "panel"); +// RNA_def_property_array(prop, 3); +// RNA_def_property_ui_text(prop, "Tiles", ""); +// RNA_def_property_update(prop, 0, "rna_userdef_update"); prop = RNA_def_property(srna, "scrollbar", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "shade1"); @@ -1656,7 +1665,7 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna) static void rna_def_userdef_theme_space_logic(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *prop; +// PropertyRNA *prop; /* space_logic */ @@ -1667,17 +1676,17 @@ static void rna_def_userdef_theme_space_logic(BlenderRNA *brna) rna_def_userdef_theme_spaces_main(srna); - prop = RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Panel", ""); - RNA_def_property_update(prop, 0, "rna_userdef_update"); +// prop = RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA); +// RNA_def_property_array(prop, 3); +// RNA_def_property_ui_text(prop, "Panel", ""); +// RNA_def_property_update(prop, 0, "rna_userdef_update"); } static void rna_def_userdef_theme_space_buts(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *prop; +// PropertyRNA *prop; /* space_buts */ @@ -1688,10 +1697,10 @@ static void rna_def_userdef_theme_space_buts(BlenderRNA *brna) rna_def_userdef_theme_spaces_main(srna); - prop = RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Panel", ""); - RNA_def_property_update(prop, 0, "rna_userdef_update"); +// prop = RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA); +// RNA_def_property_array(prop, 3); +// RNA_def_property_ui_text(prop, "Panel", ""); +// RNA_def_property_update(prop, 0, "rna_userdef_update"); } static void rna_def_userdef_theme_space_time(BlenderRNA *brna) |