[Bf-blender-cvs] [14d03af7ae5] master: Bring back code accidentally removed by previous commit
Julian Eisel
noreply at git.blender.org
Fri Mar 6 16:42:14 CET 2020
Commit: 14d03af7ae5ade1ff7ae615e3fe0df35633b3953
Author: Julian Eisel
Date: Fri Mar 6 16:38:58 2020 +0100
Branches: master
https://developer.blender.org/rB14d03af7ae5ade1ff7ae615e3fe0df35633b3953
Bring back code accidentally removed by previous commit
Probably got lost when resolving merge conflicts.
===================================================================
M source/blender/editors/interface/interface_region_popup.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list