Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYevgeny Makarov <jenkm>2020-02-28 17:58:14 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-02-28 18:03:53 +0300
commitfe3ce615287ae8c6fa5694c03a07d8699d7c8aff (patch)
treefc8b07118c4e916a36a75713eb1712b089d1cc71 /source/blender/editors/interface/interface_region_popup.c
parent0cea9353fdfef4ae736d9894e4f6a0a8cef99619 (diff)
Fix T65351: visual glitches when scrolling in popovers
Diffstat (limited to 'source/blender/editors/interface/interface_region_popup.c')
-rw-r--r--source/blender/editors/interface/interface_region_popup.c9
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);