diff options
Diffstat (limited to 'src/displayapp/screens/Navigation.cpp')
-rw-r--r-- | src/displayapp/screens/Navigation.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/displayapp/screens/Navigation.cpp b/src/displayapp/screens/Navigation.cpp index cfe60e23..fe9b5a83 100644 --- a/src/displayapp/screens/Navigation.cpp +++ b/src/displayapp/screens/Navigation.cpp @@ -28,15 +28,15 @@ LV_FONT_DECLARE(lv_font_navi_80) * Navigation watchapp * */ -Navigation::Navigation(Pinetime::Applications::DisplayApp *app, Pinetime::Controllers::NavigationService &nav) : Screen(app), navService(nav) { +Navigation::Navigation(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::NavigationService& nav) + : Screen(app), navService(nav) { - imgFlag = lv_label_create(lv_scr_act(), nullptr); + 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_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); @@ -50,14 +50,14 @@ Navigation::Navigation(Pinetime::Applications::DisplayApp *app, Pinetime::Contro lv_obj_set_width(txtManDist, LV_HOR_RES); lv_label_set_text(txtManDist, "--M"); lv_label_set_align(txtManDist, LV_LABEL_ALIGN_CENTER); - lv_obj_align(txtManDist, nullptr, LV_ALIGN_CENTER, 0, 60); + lv_obj_align(txtManDist, nullptr, LV_ALIGN_CENTER, 0, 60); - //Route Progress + // Route Progress barProgress = lv_bar_create(lv_scr_act(), nullptr); lv_obj_set_size(barProgress, 200, 20); lv_obj_align(barProgress, nullptr, LV_ALIGN_IN_BOTTOM_MID, 0, -10); lv_obj_set_style_local_bg_color(barProgress, LV_BAR_PART_BG, LV_STATE_DEFAULT, lv_color_hex(0x222222)); - lv_obj_set_style_local_bg_color(barProgress, LV_BAR_PART_INDIC , LV_STATE_DEFAULT, LV_COLOR_ORANGE); + lv_obj_set_style_local_bg_color(barProgress, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_ORANGE); lv_bar_set_anim_time(barProgress, 500); lv_bar_set_range(barProgress, 0, 100); lv_bar_set_value(barProgress, 0, LV_ANIM_OFF); @@ -72,7 +72,7 @@ bool Navigation::Refresh() { if (m_flag != navService.getFlag()) { m_flag = navService.getFlag(); lv_label_set_text(imgFlag, iconForName(m_flag)); - //lv_img_set_src_arr(imgFlag, iconForName(m_flag)); + // lv_img_set_src_arr(imgFlag, iconForName(m_flag)); } if (m_narrative != navService.getNarrative()) { @@ -88,10 +88,10 @@ bool Navigation::Refresh() { if (m_progress != navService.getProgress()) { m_progress = navService.getProgress(); lv_bar_set_value(barProgress, m_progress, LV_ANIM_OFF); - if ( m_progress > 90 ) { - lv_obj_set_style_local_bg_color(barProgress, LV_BAR_PART_INDIC , LV_STATE_DEFAULT, LV_COLOR_RED); + if (m_progress > 90) { + lv_obj_set_style_local_bg_color(barProgress, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_RED); } else { - lv_obj_set_style_local_bg_color(barProgress, LV_BAR_PART_INDIC , LV_STATE_DEFAULT, LV_COLOR_ORANGE); + lv_obj_set_style_local_bg_color(barProgress, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_ORANGE); } } |