Skip to content
6 changes: 5 additions & 1 deletion src/displayapp/screens/FirmwareUpdate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <lvgl/lvgl.h>
#include "components/ble/BleController.h"
#include "displayapp/DisplayApp.h"
#include "displayapp/InfiniTimeTheme.h"

using namespace Pinetime::Applications::Screens;

Expand All @@ -12,6 +13,9 @@ FirmwareUpdate::FirmwareUpdate(const Pinetime::Controllers::Ble& bleController)
lv_obj_align(titleLabel, nullptr, LV_ALIGN_IN_TOP_MID, 0, 50);

bar1 = lv_bar_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_bg_color(bar1, LV_BAR_PART_BG, LV_STATE_DEFAULT, Colors::bgAlt);
lv_obj_set_style_local_bg_opa(bar1, LV_BAR_PART_BG, LV_STATE_DEFAULT, LV_OPA_100);
lv_obj_set_style_local_radius(bar1, LV_BAR_PART_BG, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
lv_obj_set_size(bar1, 200, 30);
lv_obj_align(bar1, nullptr, LV_ALIGN_CENTER, 0, 0);
lv_bar_set_range(bar1, 0, 1000);
Expand Down Expand Up @@ -75,7 +79,7 @@ void FirmwareUpdate::DisplayProgression() const {
const uint32_t total = bleController.FirmwareUpdateTotalBytes();
const int16_t permille = current / (total / 1000);

lv_label_set_text_fmt(percentLabel, "%d %%", permille / 10);
lv_label_set_text_fmt(percentLabel, "%d%%", permille / 10);

lv_bar_set_value(bar1, permille, LV_ANIM_OFF);
}
Expand Down