diff options
| author | Michele Bini <michele.bini@gmail.com> | 2022-04-10 04:04:38 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-04-10 04:04:38 (GMT) |
| commit | bf92c0326a6c81eb1c344847fd677fccd4171c92 (patch) | |
| tree | 784a7ac08e1c42872532a94b1bf6d9040089de98 /src/displayapp/screens/Timer.cpp | |
| parent | 175a08f386575dced13365f179b44ea1f208a839 (diff) | |
integration fixes
Diffstat (limited to 'src/displayapp/screens/Timer.cpp')
| -rw-r--r-- | src/displayapp/screens/Timer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/displayapp/screens/Timer.cpp b/src/displayapp/screens/Timer.cpp index ca15a2f..008bec3 100644 --- a/src/displayapp/screens/Timer.cpp +++ b/src/displayapp/screens/Timer.cpp @@ -1,4 +1,5 @@ #include "displayapp/screens/Timer.h" + #include "displayapp/screens/Screen.h" #include "displayapp/screens/Symbols.h" #include <lvgl/lvgl.h> @@ -6,11 +7,11 @@ using namespace Pinetime::Applications::Screens; static void btnEventHandler(lv_obj_t* obj, lv_event_t event) { - auto* screen = static_cast<Timer*>(obj->user_data); + Timer* screen = static_cast<Timer*>(obj->user_data); screen->OnButtonEvent(obj, event); } -void Timer::CreateButtons() { +void Timer::createButtons() { btnMinutesUp = lv_btn_create(lv_scr_act(), nullptr); btnMinutesUp->user_data = this; lv_obj_set_event_cb(btnMinutesUp, btnEventHandler); @@ -98,7 +99,7 @@ Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController) lv_label_set_text(txtPlayPause, overtime ? Symbols::stop : Symbols::pause); } else { lv_label_set_text(txtPlayPause, Symbols::play); - CreateButtons(); + createButtons(); } taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this); } @@ -186,7 +187,7 @@ void Timer::OnButtonEvent(lv_obj_t* obj, lv_event_t event) { } } -void Timer::setDone() { +void Timer::SetDone() { lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_RED); lv_label_set_text(txtPlayPause, Symbols::stop); } |
