From 4de22601f544e37c2c3744e8b0b7c86c8c06353d Mon Sep 17 00:00:00 2001 From: JF Date: Tue, 10 Mar 2020 20:21:41 +0100 Subject: [PATCH] Apply a "up" transition when an app is opened. --- src/DisplayApp/DisplayApp.cpp | 1 + src/DisplayApp/LittleVgl.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/DisplayApp/DisplayApp.cpp b/src/DisplayApp/DisplayApp.cpp index 902432ac..3cb245f8 100644 --- a/src/DisplayApp/DisplayApp.cpp +++ b/src/DisplayApp/DisplayApp.cpp @@ -162,6 +162,7 @@ void DisplayApp::RunningState() { if(!currentScreen->Refresh()) { currentScreen.reset(nullptr); + lvgl.SetFullRefresh(Components::LittleVgl::FullRefreshDirections::Up); onClockApp = false; switch(nextApp) { case Apps::None: diff --git a/src/DisplayApp/LittleVgl.cpp b/src/DisplayApp/LittleVgl.cpp index 1dfbc2d1..b1b894f7 100644 --- a/src/DisplayApp/LittleVgl.cpp +++ b/src/DisplayApp/LittleVgl.cpp @@ -65,9 +65,11 @@ void LittleVgl::InitTouchpad() { } void LittleVgl::SetFullRefresh(FullRefreshDirections direction) { - scrollDirection = direction; - if(scrollDirection == FullRefreshDirections::Down) - lv_disp_set_direction(lv_disp_get_default(), 1); + if(scrollDirection == FullRefreshDirections::None) { + scrollDirection = direction; + if (scrollDirection == FullRefreshDirections::Down) + lv_disp_set_direction(lv_disp_get_default(), 1); + } } void LittleVgl::FlushDisplay(const lv_area_t *area, lv_color_t *color_p) {