diff options
author | Julian Eisel <julian@blender.org> | 2020-03-06 18:22:28 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-06 18:27:13 +0300 |
commit | d5572eacc5958db38ac4a4a32eddb3a2cd24bf68 (patch) | |
tree | 5252d8f509dae02bf9c137a1710c073d5bbac592 /source/blender/editors/interface/interface_region_popup.c | |
parent | b242cc67928a6858a835c088e4d3ea8822c83168 (diff) |
Cleanup: Reduce context usage in UI functions
Part of https://developer.blender.org/T74429.
There's a chance that this causes some issues becaue in some cases we
change from getting the window from context to getting it from somewhere
else.
Diffstat (limited to 'source/blender/editors/interface/interface_region_popup.c')
-rw-r--r-- | source/blender/editors/interface/interface_region_popup.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/source/blender/editors/interface/interface_region_popup.c b/source/blender/editors/interface/interface_region_popup.c index 462f4871764..b509f5e352b 100644 --- a/source/blender/editors/interface/interface_region_popup.c +++ b/source/blender/editors/interface/interface_region_popup.c @@ -706,15 +706,6 @@ 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); |