summaryrefslogtreecommitdiff
path: root/src/DisplayApp/Screens/Clock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/DisplayApp/Screens/Clock.cpp')
-rw-r--r--src/DisplayApp/Screens/Clock.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/DisplayApp/Screens/Clock.cpp b/src/DisplayApp/Screens/Clock.cpp
index 07db83ee..68471854 100644
--- a/src/DisplayApp/Screens/Clock.cpp
+++ b/src/DisplayApp/Screens/Clock.cpp
@@ -11,7 +11,7 @@
using namespace Pinetime::Applications::Screens;
extern lv_font_t jetbrains_mono_extrabold_compressed;
extern lv_font_t jetbrains_mono_bold_20;
-
+extern lv_style_t* LabelBigStyle;
static void event_handler(lv_obj_t * obj, lv_event_t event) {
Clock* screen = static_cast<Clock *>(obj->user_data);
@@ -41,21 +41,12 @@ Clock::Clock(DisplayApp* app,
lv_obj_align(label_date, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 60);
- labelStyle = const_cast<lv_style_t *>(lv_label_get_style(label_date, LV_LABEL_STYLE_MAIN));
- labelStyle->text.font = &jetbrains_mono_bold_20;
-
- lv_style_copy(&labelBigStyle, labelStyle);
- labelBigStyle.text.font = &jetbrains_mono_extrabold_compressed;
-
- lv_label_set_style(label_date, LV_LABEL_STYLE_MAIN, labelStyle);
-
label_time = lv_label_create(lv_scr_act(), NULL);
- lv_label_set_style(label_time, LV_LABEL_STYLE_MAIN, &labelBigStyle);
+ lv_label_set_style(label_time, LV_LABEL_STYLE_MAIN, LabelBigStyle);
lv_obj_align(label_time, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 0);
backgroundLabel = lv_label_create(lv_scr_act(), NULL);
backgroundLabel->user_data = this;
- lv_label_set_style(backgroundLabel, LV_LABEL_STYLE_MAIN, labelStyle);
lv_obj_set_click(backgroundLabel, true);
lv_obj_set_event_cb(backgroundLabel, event_handler);
lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);