summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Timer.h
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2022-03-27 18:21:44 (GMT)
committerJF <JF002@users.noreply.github.com>2022-03-28 19:12:46 (GMT)
commit8f436e1d74ffdd497c68dc2f34f6a67e430a1932 (patch)
tree86ea080e3a340884fe3f9ee02572b782eb089551 /src/displayapp/screens/Timer.h
parent4761fcb63a55749c5e46c5fe6bb53ae25b4716c8 (diff)
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.
Diffstat (limited to 'src/displayapp/screens/Timer.h')
-rw-r--r--src/displayapp/screens/Timer.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/displayapp/screens/Timer.h b/src/displayapp/screens/Timer.h
index 23c8734..93e84c8 100644
--- a/src/displayapp/screens/Timer.h
+++ b/src/displayapp/screens/Timer.h
@@ -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;
};
}