Use Bluetooth brand color for status text

This commit is contained in:
avery 2022-02-22 18:21:00 +01:00
parent 0e2b27d792
commit 2803dd667f
No known key found for this signature in database
GPG key ID: B684FD451B692E04

View file

@ -46,7 +46,7 @@ WatchFaceTerminal::WatchFaceTerminal(DisplayApp* app,
connectState = lv_label_create(lv_scr_act(), nullptr); connectState = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_recolor(connectState, true); lv_label_set_recolor(connectState, true);
lv_label_set_text(connectState, "[STAT]#387b54 Disconnected#"); lv_label_set_text(connectState, "[STAT]#0082fc Disconnected#");
lv_obj_align(connectState, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 40); lv_obj_align(connectState, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 40);
notificationIcon = lv_label_create(lv_scr_act(), nullptr); notificationIcon = lv_label_create(lv_scr_act(), nullptr);
@ -117,12 +117,12 @@ void WatchFaceTerminal::Refresh() {
bleRadioEnabled = bleController.IsRadioEnabled(); bleRadioEnabled = bleController.IsRadioEnabled();
if (bleState.IsUpdated() || bleRadioEnabled.IsUpdated()) { if (bleState.IsUpdated() || bleRadioEnabled.IsUpdated()) {
if(!bleRadioEnabled.Get()) { if(!bleRadioEnabled.Get()) {
lv_label_set_text_static(connectState, "[STAT]#387b54 Disabled#"); lv_label_set_text_static(connectState, "[STAT]#0082fc Disabled#");
} else { } else {
if (bleState.Get()) { if (bleState.Get()) {
lv_label_set_text_static(connectState, "[STAT]#387b54 Connected#"); lv_label_set_text_static(connectState, "[STAT]#0082fc Connected#");
} else { } else {
lv_label_set_text_static(connectState, "[STAT]#387b54 Disconnected#"); lv_label_set_text_static(connectState, "[STAT]#0082fc Disconnected#");
} }
} }
} }