summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/WatchFaceDigital.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/WatchFaceDigital.cpp')
-rw-r--r--src/displayapp/screens/WatchFaceDigital.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp
index 7c57d15..553feae 100644
--- a/src/displayapp/screens/WatchFaceDigital.cpp
+++ b/src/displayapp/screens/WatchFaceDigital.cpp
@@ -31,14 +31,13 @@ WatchFaceDigital::WatchFaceDigital(DisplayApp* app,
motionController {motionController} {
batteryIcon = lv_label_create(lv_scr_act(), nullptr);
- lv_label_set_text_fmt(batteryIcon, "B##%%");
- lv_obj_set_style_local_text_font(batteryIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &neofont15);
+ lv_label_set_text_static(batteryIcon, Symbols::batteryFull);
lv_obj_align(batteryIcon, nullptr, LV_ALIGN_IN_TOP_RIGHT, 0, 0);
batteryPlug = lv_label_create(lv_scr_act(), nullptr);
- lv_obj_set_style_local_text_color(batteryPlug, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0xFFFF00));
- lv_label_set_text_static(batteryPlug, "");
- lv_obj_align(batteryPlug, batteryIcon, LV_ALIGN_OUT_LEFT_MID, -5, 0);
+ lv_obj_set_style_local_text_color(batteryPlug, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0xFF0000));
+ lv_label_set_text_static(batteryPlug, Symbols::plug);
+ lv_obj_align(batteryPlug, batteryIcon, LV_ALIGN_OUT_LEFT_MID, 0, 0);
bleIcon = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_color(bleIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x0082FC));
@@ -88,7 +87,7 @@ WatchFaceDigital::~WatchFaceDigital() {
void WatchFaceDigital::Refresh() {
powerPresent = batteryController.IsPowerPresent();
if (powerPresent.IsUpdated()) {
- lv_label_set_text_static(batteryPlug, (powerPresent.Get() ? "PWR" : ""));
+ lv_label_set_text_static(batteryPlug, BatteryIcon::GetPlugIcon(powerPresent.Get()));
}
batteryPercentRemaining = batteryController.PercentRemaining();
@@ -99,7 +98,7 @@ void WatchFaceDigital::Refresh() {
} else {
lv_obj_set_style_local_text_color(batteryIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE);
}
- lv_label_set_text_fmt(batteryIcon, "B%d%%", batteryPercent);
+ lv_label_set_text_static(batteryIcon, BatteryIcon::GetBatteryIcon(batteryPercent));
}
bleState = bleController.IsConnected();