summaryrefslogtreecommitdiffstats
path: root/gui/scrolllist.cpp
diff options
context:
space:
mode:
authorthat <github@that.at>2015-02-08 08:55:00 +0100
committerDees Troy <dees_troy@teamw.in>2015-02-09 16:53:21 +0100
commitde72b6d4d8f7106a9cbb611225dd0b726ba23720 (patch)
tree184dcc1e7d96db6f66c81ff639383c1bd10887d3 /gui/scrolllist.cpp
parentReset data manager variables before running runPages (diff)
downloadandroid_bootable_recovery-de72b6d4d8f7106a9cbb611225dd0b726ba23720.tar
android_bootable_recovery-de72b6d4d8f7106a9cbb611225dd0b726ba23720.tar.gz
android_bootable_recovery-de72b6d4d8f7106a9cbb611225dd0b726ba23720.tar.bz2
android_bootable_recovery-de72b6d4d8f7106a9cbb611225dd0b726ba23720.tar.lz
android_bootable_recovery-de72b6d4d8f7106a9cbb611225dd0b726ba23720.tar.xz
android_bootable_recovery-de72b6d4d8f7106a9cbb611225dd0b726ba23720.tar.zst
android_bootable_recovery-de72b6d4d8f7106a9cbb611225dd0b726ba23720.zip
Diffstat (limited to 'gui/scrolllist.cpp')
-rw-r--r--gui/scrolllist.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/gui/scrolllist.cpp b/gui/scrolllist.cpp
index 6143b60a2..02656c79d 100644
--- a/gui/scrolllist.cpp
+++ b/gui/scrolllist.cpp
@@ -632,8 +632,10 @@ void GUIScrollList::HandleScrolling()
firstDisplayedItem--;
y_offset -= actualItemHeight;
}
- if (firstDisplayedItem == 0 && y_offset > 0)
+ if (firstDisplayedItem == 0 && y_offset > 0) {
y_offset = 0; // user kept dragging downward past the top of the list, so always reset the offset to 0 since we can't scroll any further in this direction
+ scrollingSpeed = 0; // stop kinetic scrolling
+ }
// handle dragging upward, scrolling downward
int totalSize = GetItemCount();
@@ -649,9 +651,11 @@ void GUIScrollList::HandleScrolling()
if (bottom_offset != 0 && firstDisplayedItem + lines + 1 >= totalSize && y_offset <= bottom_offset) {
firstDisplayedItem = totalSize - lines - 1;
y_offset = bottom_offset;
+ scrollingSpeed = 0; // stop kinetic scrolling
} else if (firstDisplayedItem + lines >= totalSize && y_offset < 0) {
firstDisplayedItem = totalSize - lines;
y_offset = 0;
+ scrollingSpeed = 0; // stop kinetic scrolling
}
}