2
2
#include < lvgl/lvgl.h>
3
3
#include " components/ble/BleController.h"
4
4
#include " displayapp/DisplayApp.h"
5
+ #include " displayapp/InfiniTimeTheme.h"
5
6
6
7
using namespace Pinetime ::Applications::Screens;
7
8
@@ -12,6 +13,9 @@ FirmwareUpdate::FirmwareUpdate(const Pinetime::Controllers::Ble& bleController)
12
13
lv_obj_align (titleLabel, nullptr , LV_ALIGN_IN_TOP_MID, 0 , 50 );
13
14
14
15
bar1 = lv_bar_create (lv_scr_act (), nullptr );
16
+ lv_obj_set_style_local_bg_color (bar1, LV_BAR_PART_BG, LV_STATE_DEFAULT, Colors::bgAlt);
17
+ lv_obj_set_style_local_bg_opa (bar1, LV_BAR_PART_BG, LV_STATE_DEFAULT, LV_OPA_100);
18
+ lv_obj_set_style_local_radius (bar1, LV_BAR_PART_BG, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
15
19
lv_obj_set_size (bar1, 200 , 30 );
16
20
lv_obj_align (bar1, nullptr , LV_ALIGN_CENTER, 0 , 0 );
17
21
lv_bar_set_range (bar1, 0 , 1000 );
@@ -75,7 +79,7 @@ void FirmwareUpdate::DisplayProgression() const {
75
79
const uint32_t total = bleController.FirmwareUpdateTotalBytes ();
76
80
const int16_t permille = current / (total / 1000 );
77
81
78
- lv_label_set_text_fmt (percentLabel, " %d %%" , permille / 10 );
82
+ lv_label_set_text_fmt (percentLabel, " %d%%" , permille / 10 );
79
83
80
84
lv_bar_set_value (bar1, permille, LV_ANIM_OFF);
81
85
}
0 commit comments