summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Tile.cpp
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2022-04-18 16:57:40 (GMT)
committerGitHub <noreply@github.com>2022-04-18 16:57:40 (GMT)
commited91b5a9981898078ad8e4cf105b5d52c7b63dfe (patch)
treea1011cafa0bd0b538119331fc7e092b4d716ac03 /src/displayapp/screens/Tile.cpp
parentff73f67d6f0ac6dde480aa82b0c225377ce60d49 (diff)
parent68a7016080115dd7a7eae1041eb2a75457aae0cd (diff)
Merge pull request #1044 from Riksu9000/replace-lv_set_text
Replace lv_label_set_text where possible
Diffstat (limited to 'src/displayapp/screens/Tile.cpp')
-rw-r--r--src/displayapp/screens/Tile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/displayapp/screens/Tile.cpp b/src/displayapp/screens/Tile.cpp
index 23d9bca..4df69fe 100644
--- a/src/displayapp/screens/Tile.cpp
+++ b/src/displayapp/screens/Tile.cpp
@@ -39,7 +39,7 @@ Tile::Tile(uint8_t screenID,
// Battery
batteryIcon = lv_label_create(lv_scr_act(), nullptr);
- lv_label_set_text(batteryIcon, BatteryIcon::GetBatteryIcon(batteryController.PercentRemaining()));
+ lv_label_set_text_static(batteryIcon, BatteryIcon::GetBatteryIcon(batteryController.PercentRemaining()));
lv_obj_align(batteryIcon, nullptr, LV_ALIGN_IN_TOP_RIGHT, -8, 0);
if (numScreens > 1) {
@@ -120,7 +120,7 @@ Tile::~Tile() {
void Tile::UpdateScreen() {
lv_label_set_text(label_time, dateTimeController.FormattedTime().c_str());
- lv_label_set_text(batteryIcon, BatteryIcon::GetBatteryIcon(batteryController.PercentRemaining()));
+ lv_label_set_text_static(batteryIcon, BatteryIcon::GetBatteryIcon(batteryController.PercentRemaining()));
}
void Tile::OnValueChangedEvent(lv_obj_t* obj, uint32_t buttonId) {