@@ -44,9 +44,9 @@ Steps::Steps(Pinetime::Applications::DisplayApp* app,
4444
4545 lv_obj_t * lstepsGoal = lv_label_create (lv_scr_act (), nullptr );
4646 lv_obj_set_style_local_text_color (lstepsGoal, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_CYAN);
47- lv_label_set_text_fmt (lstepsGoal, " Goal: %lu " , settingsController.GetStepsGoal ());
47+ lv_label_set_text_fmt (lstepsGoal, " Goal: %5lu " , settingsController.GetStepsGoal ());
4848 lv_label_set_align (lstepsGoal, LV_LABEL_ALIGN_CENTER);
49- lv_obj_align (lstepsGoal, lSteps, LV_ALIGN_OUT_BOTTOM_MID, 0 , 30 );
49+ lv_obj_align (lstepsGoal, lSteps, LV_ALIGN_OUT_BOTTOM_MID, 0 , 40 );
5050
5151 lv_obj_t * backgroundLabel = lv_label_create (lv_scr_act (), nullptr );
5252 lv_label_set_long_mode (backgroundLabel, LV_LABEL_LONG_CROP);
@@ -69,8 +69,8 @@ Steps::Steps(Pinetime::Applications::DisplayApp* app,
6969
7070 tripText = lv_label_create (lv_scr_act (), nullptr );
7171 lv_obj_set_style_local_text_color (tripText, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_YELLOW);
72- lv_label_set_text_fmt (tripText, " Trip: %li " , currentTripSteps);
73- lv_obj_align (tripText, lSteps, LV_ALIGN_OUT_BOTTOM_MID , 0 , 50 );
72+ lv_label_set_text_fmt (tripText, " Trip: %5li " , currentTripSteps);
73+ lv_obj_align (tripText, lstepsGoal, LV_ALIGN_IN_LEFT_MID , 0 , 20 );
7474
7575 taskRefresh = lv_task_create (RefreshTaskCallback, 100 , LV_TASK_PRIO_MID, this );
7676}
@@ -87,9 +87,11 @@ void Steps::Refresh() {
8787 lv_label_set_text_fmt (lSteps, " %li" , stepsCount);
8888 lv_obj_align (lSteps, nullptr , LV_ALIGN_CENTER, 0 , -40 );
8989
90- lv_label_set_text_fmt (tripText, " Trip: %li" , currentTripSteps);
91- lv_obj_align (tripText, lSteps, LV_ALIGN_OUT_BOTTOM_MID, 0 , 50 );
92-
90+ if (currentTripSteps < 100000 ){
91+ lv_label_set_text_fmt (tripText, " Trip: %5li" , currentTripSteps);
92+ } else {
93+ lv_label_set_text_fmt (tripText, " Trip: 99999+" );
94+ }
9395 lv_arc_set_value (stepsArc, int16_t (500 * stepsCount / settingsController.GetStepsGoal ()));
9496}
9597
0 commit comments