diff options
author | Ines Almeida <britalmeida@gmail.com> | 2018-10-13 20:49:26 +0300 |
---|---|---|
committer | Ines Almeida <britalmeida@gmail.com> | 2018-10-13 20:49:26 +0300 |
commit | ab62b7e971ab446c8c286fac305a846f83161e50 (patch) | |
tree | 7fd5a67b9653e2e10efee94374e812e76da86a05 /source/blender/editors/interface/interface_region_popover.c | |
parent | cc8424e73324b772621045c1856f9a8869faa859 (diff) | |
parent | dd6bf3f84a9137affbcd8ba0fc957c32b8c0aff7 (diff) |
Merge branch 'origin/blender2.8' into temp-ui-layout-2.8temp-ui-layout-2.8
Diffstat (limited to 'source/blender/editors/interface/interface_region_popover.c')
-rw-r--r-- | source/blender/editors/interface/interface_region_popover.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_region_popover.c b/source/blender/editors/interface/interface_region_popover.c index b71152fcd19..cb4939adc56 100644 --- a/source/blender/editors/interface/interface_region_popover.c +++ b/source/blender/editors/interface/interface_region_popover.c @@ -100,7 +100,15 @@ static void ui_popover_create_block(bContext *C, uiPopover *pup, int opcontext) BLI_assert(pup->ui_size_x != 0); uiStyle *style = UI_style_get_dpi(); + pup->block = UI_block_begin(C, NULL, __func__, UI_EMBOSS); + UI_block_flag_enable(pup->block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_POPOVER); +#ifdef USE_UI_POPOVER_ONCE + if (pup->is_once) { + UI_block_flag_enable(pup->block, UI_BLOCK_POPOVER_ONCE); + } +#endif + pup->layout = UI_block_layout( pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, pup->ui_size_x, 0, MENU_PADDING, style); @@ -139,12 +147,6 @@ static uiBlock *ui_block_func_POPOVER(bContext *C, uiPopupBlockHandle *handle, v UI_block_region_set(block, handle->region); UI_block_layout_resolve(block, &width, &height); - UI_block_flag_enable(block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_POPOVER); -#ifdef USE_UI_POPOVER_ONCE - if (pup->is_once) { - UI_block_flag_enable(block, UI_BLOCK_POPOVER_ONCE); - } -#endif UI_block_direction_set(block, UI_DIR_DOWN | UI_DIR_CENTER_X); const int block_margin = U.widget_unit / 2; |