diff options
| author | Michele Bini <michele.bini@gmail.com> | 2022-05-12 06:58:44 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-05-12 06:58:44 (GMT) |
| commit | 948661c9f650d59aa05ad93855703dab86603673 (patch) | |
| tree | d4942017b5aaddde1ddfc3bfd96a34464d68106e /src/displayapp/screens/Navigation.cpp | |
| parent | 2643cda7fee510462efc4447f3ca41f568ae8bce (diff) | |
Use ..set_text_static when statically-allocated strings are used
Diffstat (limited to 'src/displayapp/screens/Navigation.cpp')
| -rw-r--r-- | src/displayapp/screens/Navigation.cpp | 8 |
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()) { |
