Let the TopBar follow the scrolling
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user