Merge branch 'v14' of https://gitea.locker98.com/josh/InfiniTime into v14
This commit is contained in:
commit
3f9f8cb7ea
@ -14,6 +14,7 @@ void StatusIcons::Create() {
|
|||||||
lv_obj_set_style_local_pad_inner(container, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 5);
|
lv_obj_set_style_local_pad_inner(container, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 5);
|
||||||
lv_obj_set_style_local_bg_opa(container, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_TRANSP);
|
lv_obj_set_style_local_bg_opa(container, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_TRANSP);
|
||||||
|
|
||||||
|
|
||||||
bleIcon = lv_label_create(container, nullptr);
|
bleIcon = lv_label_create(container, nullptr);
|
||||||
lv_label_set_text_static(bleIcon, Screens::Symbols::bluetooth);
|
lv_label_set_text_static(bleIcon, Screens::Symbols::bluetooth);
|
||||||
|
|
||||||
@ -22,6 +23,9 @@ void StatusIcons::Create() {
|
|||||||
|
|
||||||
batteryIcon.Create(container);
|
batteryIcon.Create(container);
|
||||||
|
|
||||||
|
label_battery_value = lv_label_create(container, nullptr);
|
||||||
|
lv_label_set_text_static(label_battery_value, "00%");
|
||||||
|
|
||||||
lv_obj_align(container, nullptr, LV_ALIGN_IN_TOP_RIGHT, 0, 0);
|
lv_obj_align(container, nullptr, LV_ALIGN_IN_TOP_RIGHT, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,6 +39,7 @@ void StatusIcons::Update() {
|
|||||||
if (batteryPercentRemaining.IsUpdated()) {
|
if (batteryPercentRemaining.IsUpdated()) {
|
||||||
auto batteryPercent = batteryPercentRemaining.Get();
|
auto batteryPercent = batteryPercentRemaining.Get();
|
||||||
batteryIcon.SetBatteryPercentage(batteryPercent);
|
batteryIcon.SetBatteryPercentage(batteryPercent);
|
||||||
|
lv_label_set_text_fmt(label_battery_value, "%d%%", batteryPercent);
|
||||||
}
|
}
|
||||||
|
|
||||||
bleState = bleController.IsConnected();
|
bleState = bleController.IsConnected();
|
||||||
|
@ -36,6 +36,7 @@ namespace Pinetime {
|
|||||||
lv_obj_t* bleIcon;
|
lv_obj_t* bleIcon;
|
||||||
lv_obj_t* batteryPlug;
|
lv_obj_t* batteryPlug;
|
||||||
lv_obj_t* container;
|
lv_obj_t* container;
|
||||||
|
lv_obj_t* label_battery_value;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user