summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Metronome.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/Metronome.cpp')
-rw-r--r--src/displayapp/screens/Metronome.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/displayapp/screens/Metronome.cpp b/src/displayapp/screens/Metronome.cpp
index 2ffc52dd..df87092b 100644
--- a/src/displayapp/screens/Metronome.cpp
+++ b/src/displayapp/screens/Metronome.cpp
@@ -1,5 +1,6 @@
#include "displayapp/screens/Metronome.h"
#include "displayapp/screens/Symbols.h"
+#include "displayapp/InfiniTimeTheme.h"
using namespace Pinetime::Applications::Screens;
@@ -12,7 +13,7 @@ namespace {
lv_obj_t* createLabel(const char* name, lv_obj_t* reference, lv_align_t align, lv_font_t* font, uint8_t x, uint8_t y) {
lv_obj_t* label = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_font(label, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font);
- lv_obj_set_style_local_text_color(label, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xb0, 0xb0, 0xb0));
+ lv_obj_set_style_local_text_color(label, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::lightGray);
lv_label_set_text(label, name);
lv_obj_align(label, reference, align, x, y);
@@ -63,7 +64,8 @@ Metronome::Metronome(DisplayApp* app, Controllers::MotorController& motorControl
lv_obj_set_event_cb(playPause, eventHandler);
lv_obj_set_size(playPause, 115, 50);
lv_obj_align(playPause, lv_scr_act(), LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0);
- lv_obj_set_style_local_value_str(playPause, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, Symbols::play);
+ lblPlayPause = lv_label_create(playPause, nullptr);
+ lv_label_set_text_static(lblPlayPause, Symbols::play);
taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this);
}
@@ -125,12 +127,12 @@ void Metronome::OnEvent(lv_obj_t* obj, lv_event_t event) {
if (obj == playPause) {
metronomeStarted = !metronomeStarted;
if (metronomeStarted) {
- lv_obj_set_style_local_value_str(playPause, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, Symbols::pause);
+ lv_label_set_text_static(lblPlayPause, Symbols::pause);
systemTask.PushMessage(System::Messages::DisableSleeping);
startTime = xTaskGetTickCount();
counter = 1;
} else {
- lv_obj_set_style_local_value_str(playPause, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, Symbols::play);
+ lv_label_set_text_static(lblPlayPause, Symbols::play);
systemTask.PushMessage(System::Messages::EnableSleeping);
}
}