Timer App : add background label to ensure that the app will be displayed correctly after a full refresh (HW scrolling transition).

Code cleaning and rename methods.
This commit is contained in:
Jean-François Milants
2022-03-27 20:21:44 +02:00
committed by JF
parent 4761fcb63a
commit 8f436e1d74
3 changed files with 28 additions and 20 deletions

View File

@@ -8,32 +8,35 @@
#include "components/timer/TimerController.h"
namespace Pinetime::Applications::Screens {
class Timer : public Screen {
public:
enum class Modes { Normal, Done };
Timer(DisplayApp* app, Controllers::TimerController& timerController);
~Timer() override;
void Refresh() override;
void setDone();
void SetDone();
void OnButtonEvent(lv_obj_t* obj, lv_event_t event);
private:
void CreateButtons();
bool running;
uint8_t secondsToSet = 0;
uint8_t minutesToSet = 0;
Controllers::TimerController& timerController;
void createButtons();
lv_obj_t *time, *msecTime, *btnPlayPause, *txtPlayPause, *btnMinutesUp, *btnMinutesDown, *btnSecondsUp, *btnSecondsDown, *txtMUp,
*txtMDown, *txtSUp, *txtSDown;
lv_obj_t* backgroundLabel;
lv_obj_t* time;
lv_obj_t* msecTime;
lv_obj_t* btnPlayPause;
lv_obj_t* txtPlayPause;
lv_obj_t* btnMinutesUp;
lv_obj_t* btnMinutesDown;
lv_obj_t* btnSecondsUp;
lv_obj_t* btnSecondsDown;
lv_obj_t* txtMUp;
lv_obj_t* txtMDown;
lv_obj_t* txtSUp;
lv_obj_t* txtSDown;
lv_task_t* taskRefresh;
};
}