diff options
author | Julian Eisel <julian@blender.org> | 2020-03-06 18:38:58 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-06 18:41:57 +0300 |
commit | 14d03af7ae5ade1ff7ae615e3fe0df35633b3953 (patch) | |
tree | 7bee7284356c5f2c2f70354cbddea277ce7a0925 | |
parent | d5572eacc5958db38ac4a4a32eddb3a2cd24bf68 (diff) |
Bring back code accidentally removed by previous commit
Probably got lost when resolving merge conflicts.
-rw-r--r-- | source/blender/editors/interface/interface_region_popup.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_region_popup.c b/source/blender/editors/interface/interface_region_popup.c index b509f5e352b..462f4871764 100644 --- a/source/blender/editors/interface/interface_region_popup.c +++ b/source/blender/editors/interface/interface_region_popup.c @@ -706,6 +706,15 @@ uiBlock *ui_popup_block_refresh(bContext *C, } } else { + /* Add an offset to draw the popover arrow. */ + if ((block->flag & UI_BLOCK_POPOVER) && ELEM(block->direction, UI_DIR_UP, UI_DIR_DOWN)) { + /* Keep sync with 'ui_draw_popover_back_impl'. */ + const float unit_size = U.widget_unit / block->aspect; + const float unit_half = unit_size * (block->direction == UI_DIR_DOWN ? 0.5 : -0.5); + + UI_block_translate(block, 0, -unit_half); + } + /* clip block with window boundary */ ui_popup_block_clip(window, block); |