summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-09-14 13:44:32 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-09-14 13:44:32 +0300
commite7053ecc88f382b7d93d775c56ecc33e4d86892c (patch)
tree6ac9940f71002d864e69d66ba35079d3283938f8
parent4cf52f29b926a924d838a3158d5c78b3337ee0ee (diff)
Widget: Fixed overflow scroll bounds
-rw-r--r--src/ui/widget.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c
index 1c0fb271..25142691 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -1095,6 +1095,12 @@ iBool scrollOverflow_Widget(iWidget *d, int delta) {
1095 delta = 0; 1095 delta = 0;
1096 } 1096 }
1097 bounds.pos.y += delta; 1097 bounds.pos.y += delta;
1098 if (delta < 0) {
1099 bounds.pos.y = iMax(bounds.pos.y, validPosRange.start);
1100 }
1101 else if (delta > 0) {
1102 bounds.pos.y = iMin(bounds.pos.y, validPosRange.end);
1103 }
1098// printf("range: %d ... %d\n", range.start, range.end); 1104// printf("range: %d ... %d\n", range.start, range.end);
1099 } 1105 }
1100 else { 1106 else {