From 3106ca8f63979d23cf6944439b4122973b9deb0d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 24 Nov 2019 19:59:38 +1100 Subject: 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. --- source/blender/makesdna/DNA_space_types.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna/DNA_space_types.h') 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) */ -- cgit v1.2.3