mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 04:53:08 +00:00
[IR] change percent on number
change percent on number in ir brute
This commit is contained in:
parent
364b334654
commit
238187730c
1 changed files with 4 additions and 4 deletions
|
@ -54,11 +54,11 @@ static void infrared_progress_view_draw_callback(Canvas* canvas, void* _model) {
|
||||||
float progress_value = (float)model->progress / model->progress_total;
|
float progress_value = (float)model->progress / model->progress_total;
|
||||||
elements_progress_bar(canvas, x + 4, y + 19, width - 7, progress_value);
|
elements_progress_bar(canvas, x + 4, y + 19, width - 7, progress_value);
|
||||||
|
|
||||||
uint8_t percent_value = 100 * model->progress / model->progress_total;
|
char number_string[10] = {0};
|
||||||
char percents_string[10] = {0};
|
snprintf(
|
||||||
snprintf(percents_string, sizeof(percents_string), "%d%%", percent_value);
|
number_string, sizeof(number_string), "%d/%d", model->progress, model->progress_total);
|
||||||
elements_multiline_text_aligned(
|
elements_multiline_text_aligned(
|
||||||
canvas, x + 33, y + 37, AlignCenter, AlignCenter, percents_string);
|
canvas, x + 33, y + 37, AlignCenter, AlignCenter, number_string);
|
||||||
|
|
||||||
canvas_draw_icon(canvas, x + 14, y + height - 14, &I_Pin_back_arrow_10x8);
|
canvas_draw_icon(canvas, x + 14, y + height - 14, &I_Pin_back_arrow_10x8);
|
||||||
canvas_draw_str(canvas, x + 30, y + height - 6, "= stop");
|
canvas_draw_str(canvas, x + 30, y + height - 6, "= stop");
|
||||||
|
|
Loading…
Reference in a new issue