mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-12-28 12:14:58 +03:00
Fixed a bunch of format specifiers
This commit is contained in:
parent
f317d54218
commit
2f479e5fc7
@ -30,8 +30,8 @@ Steps::Steps(
|
||||
|
||||
lSteps = lv_label_create(lv_scr_act(), nullptr);
|
||||
lv_obj_set_style_local_text_color(lSteps, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x00FF00));
|
||||
lv_obj_set_style_local_text_font(lSteps, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
|
||||
lv_label_set_text_fmt(lSteps, "%li", stepsCount);
|
||||
lv_obj_set_style_local_text_font(lSteps, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
|
||||
lv_label_set_text_fmt(lSteps, "%li", stepsCount);
|
||||
lv_obj_align(lSteps, nullptr, LV_ALIGN_CENTER, 0, -20);
|
||||
|
||||
lv_obj_t * lstepsL = lv_label_create(lv_scr_act(), nullptr);
|
||||
@ -41,7 +41,7 @@ Steps::Steps(
|
||||
|
||||
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\n%i", settingsController.GetStepsGoal());
|
||||
lv_label_set_text_fmt(lstepsGoal, "Goal\n%lu", settingsController.GetStepsGoal());
|
||||
lv_label_set_align(lstepsGoal, LV_LABEL_ALIGN_CENTER);
|
||||
lv_obj_align(lstepsGoal, lSteps, LV_ALIGN_OUT_BOTTOM_MID, 0, 60);
|
||||
|
||||
|
@ -192,11 +192,11 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen3() {
|
||||
"\n"
|
||||
"#444444 LVGL Memory#\n"
|
||||
" #444444 used# %d (%d%%)\n"
|
||||
" #444444 max used# %d\n"
|
||||
" #444444 max used# %lu\n"
|
||||
" #444444 frag# %d%%\n"
|
||||
" #444444 free# %d"
|
||||
"\n"
|
||||
"#444444 Steps# %li",
|
||||
"#444444 Steps# %i",
|
||||
bleAddr[5],
|
||||
bleAddr[4],
|
||||
bleAddr[3],
|
||||
|
@ -63,8 +63,8 @@ Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController)
|
||||
lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY);
|
||||
|
||||
uint32_t seconds = timerController.GetTimeRemaining() / 1000;
|
||||
lv_label_set_text_fmt(time, "%02d:%02d", seconds / 60, seconds % 60);
|
||||
|
||||
lv_label_set_text_fmt(time, "%02lu:%02lu", seconds / 60, seconds % 60);
|
||||
|
||||
lv_obj_align(time, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -20);
|
||||
|
||||
btnPlayPause = lv_btn_create(lv_scr_act(), nullptr);
|
||||
@ -90,7 +90,7 @@ Timer::~Timer() {
|
||||
bool Timer::Refresh() {
|
||||
if (timerController.IsRunning()) {
|
||||
uint32_t seconds = timerController.GetTimeRemaining() / 1000;
|
||||
lv_label_set_text_fmt(time, "%02d:%02d", seconds / 60, seconds % 60);
|
||||
lv_label_set_text_fmt(time, "%02lu:%02lu", seconds / 60, seconds % 60);
|
||||
}
|
||||
return running;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ SettingSteps::SettingSteps(
|
||||
|
||||
stepValue = lv_label_create(lv_scr_act(), NULL);
|
||||
lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
|
||||
lv_label_set_text_fmt(stepValue,"%i", settingsController.GetStepsGoal());
|
||||
lv_label_set_text_fmt(stepValue, "%lu", settingsController.GetStepsGoal());
|
||||
lv_label_set_align(stepValue, LV_LABEL_ALIGN_CENTER);
|
||||
lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_CENTER, 0, -10);
|
||||
|
||||
@ -81,7 +81,7 @@ void SettingSteps::UpdateSelected(lv_obj_t *object, lv_event_t event) {
|
||||
value += 1000;
|
||||
if ( value <= 500000 ) {
|
||||
settingsController.SetStepsGoal(value);
|
||||
lv_label_set_text_fmt(stepValue,"%i", settingsController.GetStepsGoal());
|
||||
lv_label_set_text_fmt(stepValue, "%lu", settingsController.GetStepsGoal());
|
||||
lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_CENTER, 0, -10);
|
||||
}
|
||||
}
|
||||
@ -90,7 +90,7 @@ void SettingSteps::UpdateSelected(lv_obj_t *object, lv_event_t event) {
|
||||
value -= 1000;
|
||||
if ( value >= 1000 ) {
|
||||
settingsController.SetStepsGoal(value);
|
||||
lv_label_set_text_fmt(stepValue,"%i", settingsController.GetStepsGoal());
|
||||
lv_label_set_text_fmt(stepValue, "%lu", settingsController.GetStepsGoal());
|
||||
lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_CENTER, 0, -10);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user