diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-11-24 11:59:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-11-24 12:19:24 +0300 |
commit | 3106ca8f63979d23cf6944439b4122973b9deb0d (patch) | |
tree | 39f759fa5aa1b49786ade2af209ef23636d56034 /source/blender/makesdna | |
parent | 44f18ce0a6e56156c3bd67f7080b06af11e502bf (diff) |
Text Editor: smooth scrolling
Add smooth scrolling support for vertical scrolling.
This is only active while scrolling so we don't need to support
pixel-level offsets for operators, interactions.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 576a0a85b6d..8e4c4cc6ed4 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -1217,8 +1217,11 @@ typedef struct SpaceText { /** Cache for faster drawing. */ void *drawcache; - /** Runtime, for scroll increments smaller than a line. */ - float scroll_accum[2]; + /** + * Run-time for scroll increments smaller than a line (smooth scroll). + * Values must be between zero and the line, column width: (cwidth, TXT_LINE_HEIGHT(st)). + */ + int scroll_ofs_px[2]; } SpaceText; /* SpaceText flags (moved from DNA_text_types.h) */ |