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:
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_draw.c8
-rw-r--r--source/blender/editors/space_image/image_ops.c7
2 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 9a2b0d95c20..2d4ca6dc15a 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -901,6 +901,10 @@ void draw_image_cache(const bContext *C, ARegion *ar)
mask = ED_space_image_get_mask(sima);
}
+ /* 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;
+
GPU_blend(true);
GPU_blend_set_func_separate(
GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
@@ -928,10 +932,10 @@ void draw_image_cache(const bContext *C, ARegion *ar)
immVertexFormat(), "pos", GPU_COMP_I32, 2, GPU_FETCH_INT_TO_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformThemeColor(TH_CFRAME);
- immRecti(pos, x, 0, x + ceilf(framelen), 8 * UI_DPI_FAC);
+ immRecti(pos, x, region_bottom, x + ceilf(framelen), region_bottom + 8 * UI_DPI_FAC);
immUnbindProgram();
- ED_region_cache_draw_curfra_label(cfra, x, 8.0f * UI_DPI_FAC);
+ ED_region_cache_draw_curfra_label(cfra, x, region_bottom + 8.0f * UI_DPI_FAC);
if (mask != NULL) {
ED_mask_draw_frames(mask, ar, cfra, sfra, efra);
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index a8dfad85232..8d17b703449 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -3886,7 +3886,12 @@ static int change_frame_invoke(bContext *C, wmOperator *op, const wmEvent *event
if (ar->regiontype == RGN_TYPE_WINDOW) {
SpaceImage *sima = CTX_wm_space_image(C);
- if (event->mval[1] > 16 || !ED_space_image_show_cache(sima)) {
+
+ /* 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;
+
+ if (event->mval[1] > (region_bottom + 16 * UI_DPI_FAC) || !ED_space_image_show_cache(sima)) {
return OPERATOR_PASS_THROUGH;
}
}