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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-17 18:32:36 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-17 21:16:19 +0300
commita069d3dc8cc48dcd55e5eff3d002fb06d99dc123 (patch)
tree3afedad8416b29e790b9f118739f09f2a834a91c /source/blender/makesrna/intern/rna_screen.c
parent7f9a1d2f3be4ebbe63ea498d0e24591610c115b3 (diff)
UI: save statusbar/topbar collapsed state per screen.
This can now also be set from the Window menu in addition to dragging.
Diffstat (limited to 'source/blender/makesrna/intern/rna_screen.c')
-rw-r--r--source/blender/makesrna/intern/rna_screen.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index a6a23d6322d..5f199608f65 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -68,6 +68,12 @@ const EnumPropertyItem rna_enum_region_type_items[] = {
# include "BPY_extern.h"
#endif
+static void rna_Screen_bar_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+{
+ bScreen *screen = (bScreen *)ptr->data;
+ screen->do_draw = true;
+ screen->do_refresh = true;
+}
static void rna_Screen_redraw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
@@ -530,6 +536,16 @@ static void rna_def_screen(BlenderRNA *brna)
RNA_def_property_boolean_funcs(prop, "rna_Screen_fullscreen_get", NULL);
RNA_def_property_ui_text(prop, "Maximize", "An area is maximized, filling this screen");
+ prop = RNA_def_property(srna, "show_topbar", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SCREEN_COLLAPSE_TOPBAR);
+ RNA_def_property_ui_text(prop, "Show Top Bar", "Show top bar with tool settings");
+ RNA_def_property_update(prop, 0, "rna_Screen_bar_update");
+
+ prop = RNA_def_property(srna, "show_statusbar", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SCREEN_COLLAPSE_STATUSBAR);
+ RNA_def_property_ui_text(prop, "Show Status Bar", "Show status bar");
+ RNA_def_property_update(prop, 0, "rna_Screen_bar_update");
+
/* Define Anim Playback Areas */
prop = RNA_def_property(srna, "use_play_top_left_3d_editor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_REGION);