summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Navigation.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/Navigation.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/Navigation.cpp')
-rw-r--r--src/displayapp/screens/Navigation.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/displayapp/screens/Navigation.cpp b/src/displayapp/screens/Navigation.cpp
index 674362a..0dd0d30 100644
--- a/src/displayapp/screens/Navigation.cpp
+++ b/src/displayapp/screens/Navigation.cpp
@@ -134,13 +134,13 @@ Navigation::Navigation(Pinetime::Applications::DisplayApp* app, Pinetime::Contro
imgFlag = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_font(imgFlag, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &lv_font_navi_80);
lv_obj_set_style_local_text_color(imgFlag, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_CYAN);
- lv_label_set_text(imgFlag, iconForName("flag"));
+ lv_label_set_text_static(imgFlag, iconForName("flag"));
lv_obj_align(imgFlag, nullptr, LV_ALIGN_CENTER, 0, -60);
txtNarrative = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_long_mode(txtNarrative, LV_LABEL_LONG_BREAK);
lv_obj_set_width(txtNarrative, LV_HOR_RES);
- lv_label_set_text(txtNarrative, "Navigation");
+ lv_label_set_text_static(txtNarrative, "Navigation");
lv_label_set_align(txtNarrative, LV_LABEL_ALIGN_CENTER);
lv_obj_align(txtNarrative, nullptr, LV_ALIGN_CENTER, 0, 10);
@@ -148,7 +148,7 @@ Navigation::Navigation(Pinetime::Applications::DisplayApp* app, Pinetime::Contro
lv_label_set_long_mode(txtManDist, LV_LABEL_LONG_BREAK);
lv_obj_set_style_local_text_color(txtManDist, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GREEN);
lv_obj_set_width(txtManDist, LV_HOR_RES);
- lv_label_set_text(txtManDist, "--M");
+ lv_label_set_text_static(txtManDist, "--M");
lv_label_set_align(txtManDist, LV_LABEL_ALIGN_CENTER);
lv_obj_align(txtManDist, nullptr, LV_ALIGN_CENTER, 0, 60);
@@ -173,7 +173,7 @@ Navigation::~Navigation() {
void Navigation::Refresh() {
if (flag != navService.getFlag()) {
flag = navService.getFlag();
- lv_label_set_text(imgFlag, iconForName(flag));
+ lv_label_set_text_static(imgFlag, iconForName(flag));
}
if (narrative != navService.getNarrative()) {