Let the TopBar follow the scrolling

This commit is contained in:
Raphael Coeffic
2021-04-18 07:57:42 +02:00
parent f98d4c65d1
commit ba3c879f75
2 changed files with 16 additions and 1 deletions
+12
View File
@@ -138,6 +138,18 @@ void ViewMain::previousMainView()
setCurrentMainView(view);
}
void ViewMain::setScrollPositionX(coord_t value)
{
Window::setScrollPositionX(value);
topbar->setLeft(getScrollPositionX());
}
void ViewMain::setScrollPositionY(coord_t value)
{
Window::setScrollPositionY(value);
topbar->setTop(getScrollPositionY());
}
#if defined(HARDWARE_KEYS)
void ViewMain::onEvent(event_t event)
{
+4 -1
View File
@@ -74,7 +74,10 @@ class ViewMain: public Window
void setCurrentMainView(unsigned view);
void nextMainView();
void previousMainView();
void setScrollPositionX(coord_t value) override;
void setScrollPositionY(coord_t value) override;
#if defined(HARDWARE_KEYS)
void onEvent(event_t event) override;
#endif