diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-03 20:50:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-03 20:55:01 +0300 |
commit | 9e5002adedf4e701a4761c4d7f2754dcdcbb4067 (patch) | |
tree | f4bb9afd1a3943629c8f0d5d3202a6b7c234f99b /source/blender/makesrna/intern/rna_ui.c | |
parent | 16878072a499d1b328e8f2eb968e5fd4829d996b (diff) |
UI: optional ui-unit-width for popovers
Some popovers don't fit well with the default width,
allow panels to adjust as needed.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index bb7af5f327d..9d13cb8f7f0 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -1165,6 +1165,11 @@ static void rna_def_panel(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); RNA_def_property_ui_text(prop, "Parent ID Name", "If this is set, the panel becomes a subpanel"); + prop = RNA_def_property(srna, "bl_ui_units_x", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "type->ui_units_x"); + RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); + RNA_def_property_ui_text(prop, "Units X", "When set, defines popup panel width"); + prop = RNA_def_property(srna, "use_pin", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", PNL_PIN); RNA_def_property_ui_text(prop, "Pin", ""); |