window: removed getSnapStep()

This commit is contained in:
Raphael Coeffic
2022-06-11 15:13:11 +02:00
committed by Raphael Coeffic
parent bcc30638a9
commit 904eb62029
2 changed files with 0 additions and 24 deletions
-21
View File
@@ -546,27 +546,6 @@ void Window::paintChildren(BitmapBuffer * dc, std::list<Window *>::iterator it)
}
}
#if defined(HARDWARE_TOUCH)
coord_t Window::getSnapStep(coord_t relativeScrollPosition, coord_t pageSize)
{
coord_t result = 0;
if (relativeScrollPosition > pageSize / 2) {
// closer to next page
result = (pageSize - relativeScrollPosition);
}
else {
// closer to previous page
result = (0 - relativeScrollPosition);
}
// do not get too slow
if (abs(result) > 32)
result /= 2;
return result;
}
#endif
void Window::bringToTop()
{
attach(parent); // does a detach + attach
-3
View File
@@ -292,9 +292,6 @@ class Window
}
#if defined(HARDWARE_TOUCH)
static coord_t getSnapStep(coord_t relativeScrollPosition,
coord_t pageSize);
virtual bool onTouchSlide(coord_t x, coord_t y, coord_t startX,
coord_t startY, coord_t slideX, coord_t slideY);
#endif