|
|
@@ -65,7 +65,8 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
|
|
|
|
|
|
|
|
lv_style_init(&line0Style);
|
|
|
|
lv_style_init(&line0Style);
|
|
|
|
lv_style_set_line_width(&line0Style, LV_STATE_DEFAULT, 18);
|
|
|
|
lv_style_set_line_width(&line0Style, LV_STATE_DEFAULT, 18);
|
|
|
|
lv_style_set_line_color(&line0Style, LV_STATE_DEFAULT,
|
|
|
|
lv_style_set_line_color(&line0Style,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines]));
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines]));
|
|
|
|
lv_obj_add_style(line0, LV_LINE_PART_MAIN, &line0Style);
|
|
|
|
lv_obj_add_style(line0, LV_LINE_PART_MAIN, &line0Style);
|
|
|
|
line0Points[0] = {30, 25};
|
|
|
|
line0Points[0] = {30, 25};
|
|
|
@@ -74,7 +75,8 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
|
|
|
|
|
|
|
|
lv_style_init(&line1Style);
|
|
|
|
lv_style_init(&line1Style);
|
|
|
|
lv_style_set_line_width(&line1Style, LV_STATE_DEFAULT, 15);
|
|
|
|
lv_style_set_line_width(&line1Style, LV_STATE_DEFAULT, 15);
|
|
|
|
lv_style_set_line_color(&line1Style, LV_STATE_DEFAULT,
|
|
|
|
lv_style_set_line_color(&line1Style,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 1]));
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 1]));
|
|
|
|
lv_obj_add_style(line1, LV_LINE_PART_MAIN, &line1Style);
|
|
|
|
lv_obj_add_style(line1, LV_LINE_PART_MAIN, &line1Style);
|
|
|
|
line1Points[0] = {26, 167};
|
|
|
|
line1Points[0] = {26, 167};
|
|
|
@@ -83,7 +85,8 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
|
|
|
|
|
|
|
|
lv_style_init(&line2Style);
|
|
|
|
lv_style_init(&line2Style);
|
|
|
|
lv_style_set_line_width(&line2Style, LV_STATE_DEFAULT, 14);
|
|
|
|
lv_style_set_line_width(&line2Style, LV_STATE_DEFAULT, 14);
|
|
|
|
lv_style_set_line_color(&line2Style, LV_STATE_DEFAULT,
|
|
|
|
lv_style_set_line_color(&line2Style,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 2]));
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 2]));
|
|
|
|
lv_obj_add_style(line2, LV_LINE_PART_MAIN, &line2Style);
|
|
|
|
lv_obj_add_style(line2, LV_LINE_PART_MAIN, &line2Style);
|
|
|
|
line2Points[0] = {27, 40};
|
|
|
|
line2Points[0] = {27, 40};
|
|
|
@@ -92,7 +95,8 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
|
|
|
|
|
|
|
|
lv_style_init(&line3Style);
|
|
|
|
lv_style_init(&line3Style);
|
|
|
|
lv_style_set_line_width(&line3Style, LV_STATE_DEFAULT, 22);
|
|
|
|
lv_style_set_line_width(&line3Style, LV_STATE_DEFAULT, 22);
|
|
|
|
lv_style_set_line_color(&line3Style, LV_STATE_DEFAULT,
|
|
|
|
lv_style_set_line_color(&line3Style,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 3]));
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 3]));
|
|
|
|
lv_obj_add_style(line3, LV_LINE_PART_MAIN, &line3Style);
|
|
|
|
lv_obj_add_style(line3, LV_LINE_PART_MAIN, &line3Style);
|
|
|
|
line3Points[0] = {12, 182};
|
|
|
|
line3Points[0] = {12, 182};
|
|
|
@@ -101,7 +105,8 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
|
|
|
|
|
|
|
|
lv_style_init(&line4Style);
|
|
|
|
lv_style_init(&line4Style);
|
|
|
|
lv_style_set_line_width(&line4Style, LV_STATE_DEFAULT, 20);
|
|
|
|
lv_style_set_line_width(&line4Style, LV_STATE_DEFAULT, 20);
|
|
|
|
lv_style_set_line_color(&line4Style, LV_STATE_DEFAULT,
|
|
|
|
lv_style_set_line_color(&line4Style,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 4]));
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 4]));
|
|
|
|
lv_obj_add_style(line4, LV_LINE_PART_MAIN, &line4Style);
|
|
|
|
lv_obj_add_style(line4, LV_LINE_PART_MAIN, &line4Style);
|
|
|
|
line4Points[0] = {17, 99};
|
|
|
|
line4Points[0] = {17, 99};
|
|
|
@@ -110,7 +115,8 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
|
|
|
|
|
|
|
|
lv_style_init(&line5Style);
|
|
|
|
lv_style_init(&line5Style);
|
|
|
|
lv_style_set_line_width(&line5Style, LV_STATE_DEFAULT, 18);
|
|
|
|
lv_style_set_line_width(&line5Style, LV_STATE_DEFAULT, 18);
|
|
|
|
lv_style_set_line_color(&line5Style, LV_STATE_DEFAULT,
|
|
|
|
lv_style_set_line_color(&line5Style,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 5]));
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 5]));
|
|
|
|
lv_obj_add_style(line5, LV_LINE_PART_MAIN, &line5Style);
|
|
|
|
lv_obj_add_style(line5, LV_LINE_PART_MAIN, &line5Style);
|
|
|
|
line5Points[0] = {14, 81};
|
|
|
|
line5Points[0] = {14, 81};
|
|
|
@@ -119,7 +125,8 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
|
|
|
|
|
|
|
|
lv_style_init(&line6Style);
|
|
|
|
lv_style_init(&line6Style);
|
|
|
|
lv_style_set_line_width(&line6Style, LV_STATE_DEFAULT, 18);
|
|
|
|
lv_style_set_line_width(&line6Style, LV_STATE_DEFAULT, 18);
|
|
|
|
lv_style_set_line_color(&line6Style, LV_STATE_DEFAULT,
|
|
|
|
lv_style_set_line_color(&line6Style,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 6]));
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 6]));
|
|
|
|
lv_obj_add_style(line6, LV_LINE_PART_MAIN, &line6Style);
|
|
|
|
lv_obj_add_style(line6, LV_LINE_PART_MAIN, &line6Style);
|
|
|
|
line6Points[0] = {14, 163};
|
|
|
|
line6Points[0] = {14, 163};
|
|
|
@@ -128,7 +135,8 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
|
|
|
|
|
|
|
|
lv_style_init(&line7Style);
|
|
|
|
lv_style_init(&line7Style);
|
|
|
|
lv_style_set_line_width(&line7Style, LV_STATE_DEFAULT, 52);
|
|
|
|
lv_style_set_line_width(&line7Style, LV_STATE_DEFAULT, 52);
|
|
|
|
lv_style_set_line_color(&line7Style, LV_STATE_DEFAULT,
|
|
|
|
lv_style_set_line_color(&line7Style,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 7]));
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 7]));
|
|
|
|
lv_obj_add_style(line7, LV_LINE_PART_MAIN, &line7Style);
|
|
|
|
lv_obj_add_style(line7, LV_LINE_PART_MAIN, &line7Style);
|
|
|
|
line7Points[0] = {-20, 124};
|
|
|
|
line7Points[0] = {-20, 124};
|
|
|
@@ -137,7 +145,8 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
|
|
|
|
|
|
|
|
lv_style_init(&line8Style);
|
|
|
|
lv_style_init(&line8Style);
|
|
|
|
lv_style_set_line_width(&line8Style, LV_STATE_DEFAULT, 48);
|
|
|
|
lv_style_set_line_width(&line8Style, LV_STATE_DEFAULT, 48);
|
|
|
|
lv_style_set_line_color(&line8Style, LV_STATE_DEFAULT,
|
|
|
|
lv_style_set_line_color(&line8Style,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 8]));
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 8]));
|
|
|
|
lv_obj_add_style(line8, LV_LINE_PART_MAIN, &line8Style);
|
|
|
|
lv_obj_add_style(line8, LV_LINE_PART_MAIN, &line8Style);
|
|
|
|
line8Points[0] = {-29, 89};
|
|
|
|
line8Points[0] = {-29, 89};
|
|
|
@@ -150,7 +159,8 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
|
|
|
|
|
|
|
|
lv_style_init(&lineBatteryStyle);
|
|
|
|
lv_style_init(&lineBatteryStyle);
|
|
|
|
lv_style_set_line_width(&lineBatteryStyle, LV_STATE_DEFAULT, 24);
|
|
|
|
lv_style_set_line_width(&lineBatteryStyle, LV_STATE_DEFAULT, 24);
|
|
|
|
lv_style_set_line_color(&lineBatteryStyle, LV_STATE_DEFAULT,
|
|
|
|
lv_style_set_line_color(&lineBatteryStyle,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 4]));
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 4]));
|
|
|
|
lv_style_set_line_opa(&lineBatteryStyle, LV_STATE_DEFAULT, 190);
|
|
|
|
lv_style_set_line_opa(&lineBatteryStyle, LV_STATE_DEFAULT, 190);
|
|
|
|
lv_obj_add_style(lineBattery, LV_LINE_PART_MAIN, &lineBatteryStyle);
|
|
|
|
lv_obj_add_style(lineBattery, LV_LINE_PART_MAIN, &lineBatteryStyle);
|
|
|
@@ -160,7 +170,9 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
lv_obj_move_foreground(lineBattery);
|
|
|
|
lv_obj_move_foreground(lineBattery);
|
|
|
|
|
|
|
|
|
|
|
|
notificationIcon = lv_obj_create(lv_scr_act(), nullptr);
|
|
|
|
notificationIcon = lv_obj_create(lv_scr_act(), nullptr);
|
|
|
|
lv_obj_set_style_local_bg_color(notificationIcon, LV_BTN_PART_MAIN, LV_STATE_DEFAULT,
|
|
|
|
lv_obj_set_style_local_bg_color(notificationIcon,
|
|
|
|
|
|
|
|
LV_BTN_PART_MAIN,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 7]));
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 7]));
|
|
|
|
lv_obj_set_style_local_radius(notificationIcon, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
|
|
|
|
lv_obj_set_style_local_radius(notificationIcon, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
|
|
|
|
lv_obj_set_size(notificationIcon, 13, 13);
|
|
|
|
lv_obj_set_size(notificationIcon, 13, 13);
|
|
|
@@ -195,8 +207,7 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
if (font_bebas != nullptr) {
|
|
|
|
if (font_bebas != nullptr) {
|
|
|
|
lv_obj_set_style_local_text_font(labelHour, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_bebas);
|
|
|
|
lv_obj_set_style_local_text_font(labelHour, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_bebas);
|
|
|
|
lv_obj_align(labelHour, timeContainer, LV_ALIGN_IN_TOP_MID, 0, 0);
|
|
|
|
lv_obj_align(labelHour, timeContainer, LV_ALIGN_IN_TOP_MID, 0, 0);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
else {
|
|
|
|
|
|
|
|
lv_obj_set_style_local_text_font(labelHour, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_extrabold_compressed);
|
|
|
|
lv_obj_set_style_local_text_font(labelHour, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_extrabold_compressed);
|
|
|
|
lv_obj_align(labelHour, timeContainer, LV_ALIGN_IN_TOP_MID, 0, 5);
|
|
|
|
lv_obj_align(labelHour, timeContainer, LV_ALIGN_IN_TOP_MID, 0, 5);
|
|
|
|
}
|
|
|
|
}
|
|
|
@@ -204,8 +215,7 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
labelMinutes = lv_label_create(lv_scr_act(), nullptr);
|
|
|
|
labelMinutes = lv_label_create(lv_scr_act(), nullptr);
|
|
|
|
if (font_bebas != nullptr) {
|
|
|
|
if (font_bebas != nullptr) {
|
|
|
|
lv_obj_set_style_local_text_font(labelMinutes, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_bebas);
|
|
|
|
lv_obj_set_style_local_text_font(labelMinutes, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_bebas);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
else {
|
|
|
|
|
|
|
|
lv_obj_set_style_local_text_font(labelMinutes, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_extrabold_compressed);
|
|
|
|
lv_obj_set_style_local_text_font(labelMinutes, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_extrabold_compressed);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
lv_label_set_text(labelMinutes, "00");
|
|
|
|
lv_label_set_text(labelMinutes, "00");
|
|
|
@@ -214,8 +224,7 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
labelTimeAmPm = lv_label_create(lv_scr_act(), nullptr);
|
|
|
|
labelTimeAmPm = lv_label_create(lv_scr_act(), nullptr);
|
|
|
|
if (font_teko != nullptr) {
|
|
|
|
if (font_teko != nullptr) {
|
|
|
|
lv_obj_set_style_local_text_font(labelTimeAmPm, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko);
|
|
|
|
lv_obj_set_style_local_text_font(labelTimeAmPm, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
else {
|
|
|
|
|
|
|
|
lv_obj_set_style_local_text_font(labelTimeAmPm, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20);
|
|
|
|
lv_obj_set_style_local_text_font(labelTimeAmPm, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@@ -231,8 +240,7 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
lv_obj_set_style_local_text_color(labelDate, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x999999));
|
|
|
|
lv_obj_set_style_local_text_color(labelDate, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x999999));
|
|
|
|
if (font_teko != nullptr) {
|
|
|
|
if (font_teko != nullptr) {
|
|
|
|
lv_obj_set_style_local_text_font(labelDate, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko);
|
|
|
|
lv_obj_set_style_local_text_font(labelDate, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
else {
|
|
|
|
|
|
|
|
lv_obj_set_style_local_text_font(labelDate, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20);
|
|
|
|
lv_obj_set_style_local_text_font(labelDate, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
lv_obj_align(labelDate, dateContainer, LV_ALIGN_IN_TOP_MID, 0, 0);
|
|
|
|
lv_obj_align(labelDate, dateContainer, LV_ALIGN_IN_TOP_MID, 0, 0);
|
|
|
@@ -247,8 +255,7 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
|
|
|
lv_obj_set_style_local_text_color(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x999999));
|
|
|
|
lv_obj_set_style_local_text_color(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x999999));
|
|
|
|
if (font_teko != nullptr) {
|
|
|
|
if (font_teko != nullptr) {
|
|
|
|
lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko);
|
|
|
|
lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_teko);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
else {
|
|
|
|
|
|
|
|
lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20);
|
|
|
|
lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_IN_BOTTOM_RIGHT, 10, 0);
|
|
|
|
lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_IN_BOTTOM_RIGHT, 10, 0);
|
|
|
@@ -410,27 +417,49 @@ void WatchFaceInfineat::UpdateSelected(lv_obj_t* object, lv_event_t event) {
|
|
|
|
settingsController.SetInfineatColorIndex(colorIndex);
|
|
|
|
settingsController.SetInfineatColorIndex(colorIndex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (object == btnNextColor || object == btnPrevColor) {
|
|
|
|
if (object == btnNextColor || object == btnPrevColor) {
|
|
|
|
lv_obj_set_style_local_line_color(line0, LV_LINE_PART_MAIN, LV_STATE_DEFAULT,
|
|
|
|
lv_obj_set_style_local_line_color(line0,
|
|
|
|
|
|
|
|
LV_LINE_PART_MAIN,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 0]));
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 0]));
|
|
|
|
lv_obj_set_style_local_line_color(line1, LV_LINE_PART_MAIN, LV_STATE_DEFAULT,
|
|
|
|
lv_obj_set_style_local_line_color(line1,
|
|
|
|
|
|
|
|
LV_LINE_PART_MAIN,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 1]));
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 1]));
|
|
|
|
lv_obj_set_style_local_line_color(line2, LV_LINE_PART_MAIN, LV_STATE_DEFAULT,
|
|
|
|
lv_obj_set_style_local_line_color(line2,
|
|
|
|
|
|
|
|
LV_LINE_PART_MAIN,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 2]));
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 2]));
|
|
|
|
lv_obj_set_style_local_line_color(line3, LV_LINE_PART_MAIN, LV_STATE_DEFAULT,
|
|
|
|
lv_obj_set_style_local_line_color(line3,
|
|
|
|
|
|
|
|
LV_LINE_PART_MAIN,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 3]));
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 3]));
|
|
|
|
lv_obj_set_style_local_line_color(line4, LV_LINE_PART_MAIN, LV_STATE_DEFAULT,
|
|
|
|
lv_obj_set_style_local_line_color(line4,
|
|
|
|
|
|
|
|
LV_LINE_PART_MAIN,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 4]));
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 4]));
|
|
|
|
lv_obj_set_style_local_line_color(line5, LV_LINE_PART_MAIN, LV_STATE_DEFAULT,
|
|
|
|
lv_obj_set_style_local_line_color(line5,
|
|
|
|
|
|
|
|
LV_LINE_PART_MAIN,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 5]));
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 5]));
|
|
|
|
lv_obj_set_style_local_line_color(line6, LV_LINE_PART_MAIN, LV_STATE_DEFAULT,
|
|
|
|
lv_obj_set_style_local_line_color(line6,
|
|
|
|
|
|
|
|
LV_LINE_PART_MAIN,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 6]));
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 6]));
|
|
|
|
lv_obj_set_style_local_line_color(line7, LV_LINE_PART_MAIN, LV_STATE_DEFAULT,
|
|
|
|
lv_obj_set_style_local_line_color(line7,
|
|
|
|
|
|
|
|
LV_LINE_PART_MAIN,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 7]));
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 7]));
|
|
|
|
lv_obj_set_style_local_line_color(line8, LV_LINE_PART_MAIN, LV_STATE_DEFAULT,
|
|
|
|
lv_obj_set_style_local_line_color(line8,
|
|
|
|
|
|
|
|
LV_LINE_PART_MAIN,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 8]));
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 8]));
|
|
|
|
lv_obj_set_style_local_line_color(lineBattery, LV_LINE_PART_MAIN, LV_STATE_DEFAULT,
|
|
|
|
lv_obj_set_style_local_line_color(lineBattery,
|
|
|
|
|
|
|
|
LV_LINE_PART_MAIN,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 4]));
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 4]));
|
|
|
|
lv_obj_set_style_local_bg_color(notificationIcon, LV_BTN_PART_MAIN, LV_STATE_DEFAULT,
|
|
|
|
lv_obj_set_style_local_bg_color(notificationIcon,
|
|
|
|
|
|
|
|
LV_BTN_PART_MAIN,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 7]));
|
|
|
|
lv_color_hex(infineatColors.orange[colorIndex * nLines + 7]));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@@ -564,9 +593,13 @@ void WatchFaceInfineat::ToggleBatteryIndicatorColor(bool showSideCover) {
|
|
|
|
lv_obj_set_style_local_bg_color(notificationIcon, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE);
|
|
|
|
lv_obj_set_style_local_bg_color(notificationIcon, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
lv_obj_set_style_local_image_recolor_opa(logoPine, LV_IMG_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0);
|
|
|
|
lv_obj_set_style_local_image_recolor_opa(logoPine, LV_IMG_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_0);
|
|
|
|
lv_obj_set_style_local_line_color(lineBattery, LV_LINE_PART_MAIN, LV_STATE_DEFAULT,
|
|
|
|
lv_obj_set_style_local_line_color(lineBattery,
|
|
|
|
|
|
|
|
LV_LINE_PART_MAIN,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 4]));
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 4]));
|
|
|
|
lv_obj_set_style_local_bg_color(notificationIcon, LV_BTN_PART_MAIN, LV_STATE_DEFAULT,
|
|
|
|
lv_obj_set_style_local_bg_color(notificationIcon,
|
|
|
|
|
|
|
|
LV_BTN_PART_MAIN,
|
|
|
|
|
|
|
|
LV_STATE_DEFAULT,
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 7]));
|
|
|
|
lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 7]));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|