diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 70cb28fa937..86f5ba9c975 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -82,8 +82,8 @@ #define SEQ_LEFTHANDLE 1 #define SEQ_RIGHTHANDLE 2 -#define SEQ_HANDLE_SIZE_MIN 7.0f -#define SEQ_HANDLE_SIZE_MAX 40.0f +#define SEQ_HANDLE_SIZE_MIN 5.25f +#define SEQ_HANDLE_SIZE_MAX 30.0f #define SEQ_SCROLLER_TEXT_OFFSET 8 @@ -449,11 +449,11 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1, } /* clamp handles to defined size in pixel space */ float sequence_handle_size_get_clamped(Sequence *seq, const float pixelx) { const float minhandle = pixelx * SEQ_HANDLE_SIZE_MIN; const float maxhandle = pixelx * SEQ_HANDLE_SIZE_MAX; - float size = CLAMPIS(seq->handsize, minhandle, maxhandle); + float size = CLAMPIS(seq->handsize * 0.75f, minhandle, maxhandle); /* ensure we're not greater than half width */ return min_ff(size, ((float)(seq->enddisp - seq->startdisp) / 2.0f) / pixelx); @@ -479,26 +479,26 @@ static void draw_seq_handle(View2D *v2d, /* set up co-ordinates/dimensions for either left or right handle */ if (direction == SEQ_LEFTHANDLE) { rx1 = x1; - rx2 = x1 + handsize_clamped * 0.75f; + rx2 = x1 + handsize_clamped; - v1[0] = x1 + handsize_clamped / 4; + v1[0] = x1 + handsize_clamped / 3; v1[1] = y1 + (((y1 + y2) / 2.0f - y1) / 2); - v2[0] = x1 + handsize_clamped / 4; + v2[0] = x1 + handsize_clamped / 3; v2[1] = y2 - (((y1 + y2) / 2.0f - y1) / 2); - v3[0] = v2[0] + handsize_clamped / 4; + v3[0] = v2[0] + handsize_clamped / 3; v3[1] = (y1 + y2) / 2.0f; whichsel = SEQ_LEFTSEL; } else if (direction == SEQ_RIGHTHANDLE) { - rx1 = x2 - handsize_clamped * 0.75f; + rx1 = x2 - handsize_clamped; rx2 = x2; - v1[0] = x2 - handsize_clamped / 4; + v1[0] = x2 - handsize_clamped / 3; v1[1] = y1 + (((y1 + y2) / 2.0f - y1) / 2); - v2[0] = x2 - handsize_clamped / 4; + v2[0] = x2 - handsize_clamped / 3; v2[1] = y2 - (((y1 + y2) / 2.0f - y1) / 2); - v3[0] = v2[0] - handsize_clamped / 4; + v3[0] = v2[0] - handsize_clamped / 3; v3[1] = (y1 + y2) / 2.0f; whichsel = SEQ_RIGHTSEL; @@ -551,7 +551,7 @@ static void draw_seq_handle(View2D *v2d, } else { numstr_len = BLI_snprintf_rlen(numstr, sizeof(numstr), "%d", seq->enddisp - 1); - x1 = x2 - handsize_clamped * 0.75f; + x1 = x2 - handsize_clamped; y1 = y2 + 0.05f; } UI_view2d_text_cache_add(v2d, x1, y1, numstr, numstr_len, col); @@ -962,8 +962,8 @@ static void draw_seq_strip(const bContext *C, immUnbindProgram(); /* calculate if seq is long enough to print a name */ - x1 = seq->startdisp + handsize_clamped; - x2 = seq->enddisp - handsize_clamped; + float text_margin = handsize_clamped * 1.3333f; + x1 = seq->startdisp + text_margin; + x2 = seq->enddisp - text_margin; float scroller_vert_xoffs = (V2D_SCROLL_HANDLE_WIDTH + SEQ_SCROLLER_TEXT_OFFSET) * pixelx;