[Bf-blender-cvs] [3d1138840c9] master: Fix strip text hiding behind scrollers
Richard Antalik
noreply at git.blender.org
Mon Mar 18 21:11:59 CET 2019
Commit: 3d1138840c9e44384d773a1786c4c8893571f20b
Author: Richard Antalik
Date: Mon Mar 18 12:09:22 2019 -0700
Branches: master
https://developer.blender.org/rB3d1138840c9e44384d773a1786c4c8893571f20b
Fix strip text hiding behind scrollers
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4506
===================================================================
M source/blender/editors/space_sequencer/sequencer_draw.c
===================================================================
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 3b6ca4934fe..0f935031ecc 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -82,6 +82,8 @@
#define SEQ_HANDLE_SIZE_MIN 7.0f
#define SEQ_HANDLE_SIZE_MAX 40.0f
+#define SEQ_SCROLLER_TEXT_OFFSET 8
+
/* Note, Don't use SEQ_BEGIN/SEQ_END while drawing!
* it messes up transform, - Campbell */
@@ -860,8 +862,10 @@ static void draw_seq_strip(
x1 = seq->startdisp + handsize_clamped;
x2 = seq->enddisp - handsize_clamped;
+ float scroller_vert_xoffs = (V2D_SCROLL_WIDTH_TEXT + SEQ_SCROLLER_TEXT_OFFSET) * pixelx;
+
/* info text on the strip */
- if (x1 < v2d->cur.xmin) x1 = v2d->cur.xmin;
+ if (x1 < v2d->cur.xmin + scroller_vert_xoffs) x1 = v2d->cur.xmin + scroller_vert_xoffs;
else if (x1 > v2d->cur.xmax) x1 = v2d->cur.xmax;
if (x2 < v2d->cur.xmin) x2 = v2d->cur.xmin;
else if (x2 > v2d->cur.xmax) x2 = v2d->cur.xmax;
More information about the Bf-blender-cvs
mailing list