diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2019-10-29 18:49:27 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2019-10-29 18:51:55 +0300 |
commit | 87ac3d14b29d61d74b9aee2296f5b9892e2aa4a0 (patch) | |
tree | de71a6de84c517837a9107253858f85018a4dfd5 /source/blender/editors/mask | |
parent | aa841e2bd53bf9ed19f4902a36e6a9b483602bea (diff) |
Fix T70905: Image Editor header hides mask, cache and keyframe info if
flipped to bottom
While flipping the header to bottom works in the MCE (because MCE doesnt
allow overlapping UI) we need to take the regions visible rect into
account for the Image Editor.
Also correct clickable scubbing area (poll for frame_change) in the
Image Editor and the MovieClip Editor not taking UI_DPI_FAC into
account.
Maniphest Tasks: T70905
Differential Revision: https://developer.blender.org/D6090
Diffstat (limited to 'source/blender/editors/mask')
-rw-r--r-- | source/blender/editors/mask/mask_draw.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c index 7247697dcb7..85fedac05ce 100644 --- a/source/blender/editors/mask/mask_draw.c +++ b/source/blender/editors/mask/mask_draw.c @@ -38,6 +38,7 @@ #include "ED_clip.h" #include "ED_mask.h" /* own include */ +#include "ED_screen.h" #include "ED_space_api.h" #include "BIF_glutil.h" @@ -802,6 +803,10 @@ void ED_mask_draw_frames(Mask *mask, ARegion *ar, const int cfra, const int sfra unsigned int num_lines = BLI_listbase_count(&masklay->splines_shapes); if (num_lines > 0) { + /* Local coordinate visible rect inside region, to accommodate overlapping ui. */ + const rcti *rect_visible = ED_region_visible_rect(ar); + const int region_bottom = rect_visible->ymin; + uint pos = GPU_vertformat_attr_add( immVertexFormat(), "pos", GPU_COMP_I32, 2, GPU_FETCH_INT_TO_FLOAT); @@ -817,8 +822,8 @@ void ED_mask_draw_frames(Mask *mask, ARegion *ar, const int cfra, const int sfra /* draw_keyframe(i, CFRA, sfra, framelen, 1); */ int height = (frame == cfra) ? 22 : 10; int x = (frame - sfra) * framelen; - immVertex2i(pos, x, 0); - immVertex2i(pos, x, height); + immVertex2i(pos, x, region_bottom); + immVertex2i(pos, x, region_bottom + height * UI_DPI_FAC); } immEnd(); immUnbindProgram(); |