mirror of
https://github.com/yuri91/ili9341-rs.git
synced 2024-11-21 14:30:58 +00:00
Merge pull request #22 from almusil/fix_scrolling
Fix underflow in scrolling
This commit is contained in:
commit
2b7ee112fb
1 changed files with 1 additions and 1 deletions
|
@ -225,7 +225,7 @@ where
|
||||||
scroller.top_offset += num_lines;
|
scroller.top_offset += num_lines;
|
||||||
if scroller.top_offset > (scroller.height - scroller.fixed_bottom_lines) {
|
if scroller.top_offset > (scroller.height - scroller.fixed_bottom_lines) {
|
||||||
scroller.top_offset = scroller.fixed_top_lines
|
scroller.top_offset = scroller.fixed_top_lines
|
||||||
+ (scroller.top_offset - scroller.height + scroller.fixed_bottom_lines)
|
+ (scroller.top_offset + scroller.fixed_bottom_lines - scroller.height)
|
||||||
}
|
}
|
||||||
|
|
||||||
self.command(
|
self.command(
|
||||||
|
|
Loading…
Reference in a new issue