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
This commit is contained in:
Dalai Felinto 2021-09-16 15:27:36 +02:00
parent 9fee59a484
commit f2cfad77f9
3 changed files with 11 additions and 0 deletions

View File

@ -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;
}

View File

@ -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 */

View File

@ -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)