From 7fdde7fd86f2448700e6473ae4bc5f8b1d4b1208 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 9 Jun 2018 17:36:28 +0200 Subject: UI: use draw_header function for popover buttons Add 'is_popover' for panel draw functions to check if they're in a popup. This puts dyntopo toggle next to the popover. --- source/blender/makesrna/intern/rna_ui.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/makesrna/intern/rna_ui.c') diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index e02421b9270..ebee502515f 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -1132,6 +1132,11 @@ static void rna_def_panel(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Pin", ""); /* XXX, should only tag region for redraw */ RNA_def_property_update(prop, NC_WINDOW, NULL); + + prop = RNA_def_property(srna, "is_popover", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PNL_POPOVER); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Popover", ""); } static void rna_def_uilist(BlenderRNA *brna) -- cgit v1.2.3