Some more fixes related to scrolling
This commit is contained in:
committed by
Raphael Coeffic
parent
ba6f3dd9a2
commit
49ba2e46b2
-16
@@ -562,22 +562,6 @@ bool Window::onTouchSlide(coord_t x, coord_t y, coord_t startX, coord_t startY,
|
||||
}
|
||||
}
|
||||
|
||||
if (slidingWindow && slidingWindow != this) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (slideY && innerHeight > rect.h) {
|
||||
setScrollPositionY(scrollPositionY - slideY);
|
||||
slidingWindow = this;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (slideX && innerWidth > rect.w) {
|
||||
setScrollPositionX(scrollPositionX - slideX);
|
||||
slidingWindow = this;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
+3
-3
@@ -215,7 +215,7 @@ class Window
|
||||
if (windowFlags & FORWARD_SCROLL)
|
||||
innerHeight = value;
|
||||
else if (innerHeight <= value) {
|
||||
setScrollPositionY(0);
|
||||
lv_obj_scroll_to_y(lvobj, 0, LV_ANIM_OFF);
|
||||
}
|
||||
invalidate();
|
||||
}
|
||||
@@ -325,12 +325,12 @@ class Window
|
||||
parent->adjustInnerHeight();
|
||||
}
|
||||
else if (height() >= h) {
|
||||
setScrollPositionY(0);
|
||||
lv_obj_scroll_to_y(lvobj, 0, LV_ANIM_OFF);
|
||||
}
|
||||
else {
|
||||
coord_t maxScrollPosition = h - height();
|
||||
if (scrollPositionY > maxScrollPosition) {
|
||||
setScrollPositionY(maxScrollPosition);
|
||||
lv_obj_scroll_to_y(lvobj, maxScrollPosition, LV_ANIM_OFF);
|
||||
}
|
||||
}
|
||||
invalidate();
|
||||
|
||||
Reference in New Issue
Block a user