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:
authorCampbell Barton <ideasman42@gmail.com>2019-11-24 11:59:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-11-24 12:19:24 +0300
commit3106ca8f63979d23cf6944439b4122973b9deb0d (patch)
tree39f759fa5aa1b49786ade2af209ef23636d56034 /source/blender/makesdna/DNA_space_types.h
parent44f18ce0a6e56156c3bd67f7080b06af11e502bf (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/DNA_space_types.h')
-rw-r--r--source/blender/makesdna/DNA_space_types.h7
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) */