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:
authorDalai Felinto <dalai@blender.org>2021-09-16 16:27:36 +0300
committerDalai Felinto <dalai@blender.org>2021-09-16 17:02:33 +0300
commitf2cfad77f9f8876edfdc9930206fc12db71f25b0 (patch)
tree72f1a49a2c3ac0419df1f07c4a3b852142bbbeb6
parent9fee59a4849cdedf0ce5332ec78c70dd128aa3b1 (diff)
App Settings: Regions Visbility Toggle
The toggle that allow users to "show" the region (header, toolbar, ...) when it is collapsed can now be configured for the apps. Note: This option is not visibile in the UI. Differential Revision: D12516
-rw-r--r--source/blender/editors/screen/area.c4
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c6
3 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index e907c7e153f..384445db9fb 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1058,6 +1058,10 @@ static bool region_azone_edge_poll(const ARegion *region, const bool is_fullscre
return false;
}
+ if (is_hidden && (U.app_flag & USER_APP_HIDE_REGION_TOGGLE)) {
+ return false;
+ }
+
return true;
}
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 37a3d60a647..2203068928c 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -1136,6 +1136,7 @@ typedef enum eUserpref_TableAPI {
/** #UserDef.app_flag */
typedef enum eUserpref_APP_Flag {
USER_APP_LOCK_CORNER_SPLIT = (1 << 0),
+ USER_APP_HIDE_REGION_TOGGLE = (1 << 1),
} eUserpref_APP_Flag;
/** #UserDef.statusbar_flag */
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 0a123c59ee2..a457cb980ee 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -6245,6 +6245,12 @@ static void rna_def_userdef_apps(BlenderRNA *brna)
RNA_def_property_ui_text(
prop, "Corner Splitting", "Split and join editors by dragging from corners");
RNA_def_property_update(prop, 0, "rna_userdef_screen_update");
+
+ prop = RNA_def_property(srna, "show_regions_visibility_toggle", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "app_flag", USER_APP_HIDE_REGION_TOGGLE);
+ RNA_def_property_ui_text(
+ prop, "Regions Visibility Toggle", "Header and side bars visibility toggles");
+ RNA_def_property_update(prop, 0, "rna_userdef_screen_update");
}
static void rna_def_userdef_experimental(BlenderRNA *brna)