summaryrefslogtreecommitdiff
path: root/src/displayapp
diff options
context:
space:
mode:
authorStephanie <eng.steph@gmail.com>2021-10-22 19:21:51 -0400
committerJF <JF002@users.noreply.github.com>2021-12-30 21:51:43 +0100
commit7eff1dbcc631c41e05b372e993383be3554f348c (patch)
tree5047c99458dab916446f0ed742ba93770bb253cf /src/displayapp
parentf7d1b3f36847bcbd0699feeb8515bb6517690066 (diff)
Changed text to left pad
Diffstat (limited to 'src/displayapp')
-rw-r--r--src/displayapp/screens/Steps.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/displayapp/screens/Steps.cpp b/src/displayapp/screens/Steps.cpp
index cb1297b6..ea11ca6d 100644
--- a/src/displayapp/screens/Steps.cpp
+++ b/src/displayapp/screens/Steps.cpp
@@ -44,9 +44,9 @@ Steps::Steps(Pinetime::Applications::DisplayApp* app,
lv_obj_t* lstepsGoal = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_color(lstepsGoal, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_CYAN);
- lv_label_set_text_fmt(lstepsGoal, "Goal: %lu", settingsController.GetStepsGoal());
+ lv_label_set_text_fmt(lstepsGoal, "Goal: %5lu", settingsController.GetStepsGoal());
lv_label_set_align(lstepsGoal, LV_LABEL_ALIGN_CENTER);
- lv_obj_align(lstepsGoal, lSteps, LV_ALIGN_OUT_BOTTOM_MID, 0, 30);
+ lv_obj_align(lstepsGoal, lSteps, LV_ALIGN_OUT_BOTTOM_MID, 0, 40);
lv_obj_t* backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
@@ -69,8 +69,8 @@ Steps::Steps(Pinetime::Applications::DisplayApp* app,
tripText = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_color(tripText, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_YELLOW);
- lv_label_set_text_fmt(tripText, "Trip: %li", currentTripSteps);
- lv_obj_align(tripText, lSteps, LV_ALIGN_OUT_BOTTOM_MID, 0, 50);
+ lv_label_set_text_fmt(tripText, "Trip: %5li", currentTripSteps);
+ lv_obj_align(tripText, lstepsGoal, LV_ALIGN_IN_LEFT_MID, 0, 20);
taskRefresh = lv_task_create(RefreshTaskCallback, 100, LV_TASK_PRIO_MID, this);
}
@@ -87,9 +87,11 @@ void Steps::Refresh() {
lv_label_set_text_fmt(lSteps, "%li", stepsCount);
lv_obj_align(lSteps, nullptr, LV_ALIGN_CENTER, 0, -40);
- lv_label_set_text_fmt(tripText, "Trip: %li", currentTripSteps);
- lv_obj_align(tripText, lSteps, LV_ALIGN_OUT_BOTTOM_MID, 0, 50);
-
+ if (currentTripSteps < 100000){
+ lv_label_set_text_fmt(tripText, "Trip: %5li", currentTripSteps);
+ } else {
+ lv_label_set_text_fmt(tripText, "Trip: 99999+");
+ }
lv_arc_set_value(stepsArc, int16_t(500 * stepsCount / settingsController.GetStepsGoal()));
}