From c59d6e49727f207b52b7dfa740bd6f7610a491da Mon Sep 17 00:00:00 2001 From: Kieran Cawthray Date: Wed, 8 Nov 2023 20:52:37 +0100 Subject: [PATCH 1/3] Initial commit --- src/displayapp/fonts/fonts.json | 2 +- src/displayapp/screens/Navigation.cpp | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/displayapp/fonts/fonts.json b/src/displayapp/fonts/fonts.json index bcfc365f03..8416fc5ef3 100644 --- a/src/displayapp/fonts/fonts.json +++ b/src/displayapp/fonts/fonts.json @@ -18,7 +18,7 @@ "sources": [ { "file": "JetBrainsMono-Regular.ttf", - "range": "0x25, 0x2b, 0x2d, 0x30-0x3a" + "range": "0x25, 0x2b, 0x2d, 0x30-0x3a, 0x4b-0x4d, 0x66, 0x69, 0x6b, 0x6d, 0x74" } ], "bpp": 1, diff --git a/src/displayapp/screens/Navigation.cpp b/src/displayapp/screens/Navigation.cpp index 799ac8a9fa..2985ee6583 100644 --- a/src/displayapp/screens/Navigation.cpp +++ b/src/displayapp/screens/Navigation.cpp @@ -203,19 +203,23 @@ Navigation::Navigation(Pinetime::Controllers::NavigationService& nav) : navServi 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_label_set_long_mode(txtNarrative, LV_LABEL_LONG_DOT); lv_obj_set_width(txtNarrative, LV_HOR_RES); - lv_label_set_text_static(txtNarrative, "Navigation"); + lv_obj_set_height(txtNarrative, 80); + //lv_label_set_text_static(txtNarrative, "Navigation"); + lv_label_set_text(txtNarrative, "Navigation blah blah very long text really long road name etc etc etc"); lv_label_set_align(txtNarrative, LV_LABEL_ALIGN_CENTER); - lv_obj_align(txtNarrative, nullptr, LV_ALIGN_CENTER, 0, 10); + lv_obj_align(txtNarrative, nullptr, LV_ALIGN_CENTER, 0, 30); txtManDist = lv_label_create(lv_scr_act(), nullptr); 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_style_local_text_font(txtManDist, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); lv_obj_set_width(txtManDist, LV_HOR_RES); - lv_label_set_text_static(txtManDist, "--M"); + //lv_label_set_text_static(txtManDist, "--M"); + lv_label_set_text_static(txtManDist, "123m"); 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, 90); // Route Progress barProgress = lv_bar_create(lv_scr_act(), nullptr); From 9900ab55cb8553fa8289197c7fa95c6321591496 Mon Sep 17 00:00:00 2001 From: Kieran Cawthray Date: Wed, 8 Nov 2023 20:55:42 +0100 Subject: [PATCH 2/3] Tidy up --- src/displayapp/screens/Navigation.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/displayapp/screens/Navigation.cpp b/src/displayapp/screens/Navigation.cpp index 2985ee6583..ee9f2a0002 100644 --- a/src/displayapp/screens/Navigation.cpp +++ b/src/displayapp/screens/Navigation.cpp @@ -206,8 +206,7 @@ Navigation::Navigation(Pinetime::Controllers::NavigationService& nav) : navServi lv_label_set_long_mode(txtNarrative, LV_LABEL_LONG_DOT); lv_obj_set_width(txtNarrative, LV_HOR_RES); lv_obj_set_height(txtNarrative, 80); - //lv_label_set_text_static(txtNarrative, "Navigation"); - lv_label_set_text(txtNarrative, "Navigation blah blah very long text really long road name etc etc etc"); + 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, 30); @@ -216,8 +215,7 @@ Navigation::Navigation(Pinetime::Controllers::NavigationService& nav) : navServi lv_obj_set_style_local_text_color(txtManDist, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GREEN); lv_obj_set_style_local_text_font(txtManDist, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); lv_obj_set_width(txtManDist, LV_HOR_RES); - //lv_label_set_text_static(txtManDist, "--M"); - lv_label_set_text_static(txtManDist, "123m"); + 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, 90); From 730803067f421a032dca0b1ecab1ab834e831114 Mon Sep 17 00:00:00 2001 From: Kieran Cawthray Date: Tue, 6 Feb 2024 22:44:15 +0100 Subject: [PATCH 3/3] Forgotten dot --- src/displayapp/fonts/fonts.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/displayapp/fonts/fonts.json b/src/displayapp/fonts/fonts.json index d9127dea3a..57341245d5 100644 --- a/src/displayapp/fonts/fonts.json +++ b/src/displayapp/fonts/fonts.json @@ -18,7 +18,7 @@ "sources": [ { "file": "JetBrainsMono-Regular.ttf", - "range": "0x25, 0x2b, 0x2d, 0x30-0x3a, 0x4b-0x4d, 0x66, 0x69, 0x6b, 0x6d, 0x74" + "range": "0x25, 0x2b, 0x2d, 0x2e, 0x30-0x3a, 0x4b-0x4d, 0x66, 0x69, 0x6b, 0x6d, 0x74" } ], "bpp": 1,