window: removed getSnapStep()
This commit is contained in:
committed by
Raphael Coeffic
parent
bcc30638a9
commit
904eb62029
-21
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user