Skip to content

Commit 53c0b74

Browse files
committed
added bg color to progess bar; removed space between value and %-symbol
1 parent c73f016 commit 53c0b74

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/displayapp/screens/FirmwareUpdate.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <lvgl/lvgl.h>
33
#include "components/ble/BleController.h"
44
#include "displayapp/DisplayApp.h"
5+
#include "displayapp/InfiniTimeTheme.h"
56

67
using namespace Pinetime::Applications::Screens;
78

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

1415
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);
1519
lv_obj_set_size(bar1, 200, 30);
1620
lv_obj_align(bar1, nullptr, LV_ALIGN_CENTER, 0, 0);
1721
lv_bar_set_range(bar1, 0, 1000);
@@ -75,7 +79,7 @@ void FirmwareUpdate::DisplayProgression() const {
7579
const uint32_t total = bleController.FirmwareUpdateTotalBytes();
7680
const int16_t permille = current / (total / 1000);
7781

78-
lv_label_set_text_fmt(percentLabel, "%d %%", permille / 10);
82+
lv_label_set_text_fmt(percentLabel, "%d%%", permille / 10);
7983

8084
lv_bar_set_value(bar1, permille, LV_ANIM_OFF);
8185
}

0 commit comments

Comments
 (0)