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:
authorRichard Antalik <richardantalik@gmail.com>2019-03-18 22:09:22 +0300
committerRichard Antalik <richardantalik@gmail.com>2019-03-18 23:11:33 +0300
commit3d1138840c9e44384d773a1786c4c8893571f20b (patch)
treecbcf8ff8442251b5b8a92da539c40ff3f0051574 /source/blender/editors/space_sequencer
parenta761a93d411da3798ff52f8c48381c5f46690818 (diff)
Fix strip text hiding behind scrollers
Reviewers: brecht Differential Revision: https://developer.blender.org/D4506
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c6
1 files changed, 5 insertions, 1 deletions
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;