FluxDC/components/FluxUI/screens/ui_Batinfo.c
2025-03-07 15:13:29 +08:00

149 lines
7.8 KiB
C

// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.5.1
// LVGL version: 8.3.6
// Project name: ESP32S3_UI
#include "../ui.h"
void ui_Batinfo_screen_init(void)
{
ui_Batinfo = lv_obj_create(NULL);
lv_obj_clear_flag(ui_Batinfo, LV_OBJ_FLAG_SCROLLABLE); /// Flags
ui_Batinfo_Panel8 = lv_obj_create(ui_Batinfo);
lv_obj_set_width(ui_Batinfo_Panel8, 320);
lv_obj_set_height(ui_Batinfo_Panel8, 50);
lv_obj_set_align(ui_Batinfo_Panel8, LV_ALIGN_TOP_MID);
lv_obj_clear_flag(ui_Batinfo_Panel8, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_radius(ui_Batinfo_Panel8, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui_Batinfo_Panel8, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Batinfo_Label14 = lv_label_create(ui_Batinfo_Panel8);
lv_obj_set_width(ui_Batinfo_Label14, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Batinfo_Label14, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Batinfo_Label14, 4);
lv_obj_set_y(ui_Batinfo_Label14, 0);
lv_obj_set_align(ui_Batinfo_Label14, LV_ALIGN_LEFT_MID);
lv_label_set_text(ui_Batinfo_Label14, "<");
ui_Batinfo_Label15 = lv_label_create(ui_Batinfo_Panel8);
lv_obj_set_width(ui_Batinfo_Label15, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Batinfo_Label15, LV_SIZE_CONTENT); /// 1
lv_obj_set_align(ui_Batinfo_Label15, LV_ALIGN_CENTER);
lv_label_set_text(ui_Batinfo_Label15, "电池");
lv_obj_set_style_text_font(ui_Batinfo_Label15, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Batinfo_Panel9 = lv_obj_create(ui_Batinfo);
lv_obj_set_width(ui_Batinfo_Panel9, 310);
lv_obj_set_height(ui_Batinfo_Panel9, 221);
lv_obj_set_x(ui_Batinfo_Panel9, 0);
lv_obj_set_y(ui_Batinfo_Panel9, -73);
lv_obj_set_align(ui_Batinfo_Panel9, LV_ALIGN_CENTER);
lv_obj_clear_flag(ui_Batinfo_Panel9, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_color(ui_Batinfo_Panel9, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_Batinfo_Panel9, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Batinfo_Label16 = lv_label_create(ui_Batinfo_Panel9);
lv_obj_set_width(ui_Batinfo_Label16, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Batinfo_Label16, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Batinfo_Label16, -122);
lv_obj_set_y(ui_Batinfo_Label16, -75);
lv_obj_set_align(ui_Batinfo_Label16, LV_ALIGN_CENTER);
lv_label_set_text(ui_Batinfo_Label16, "电量:");
lv_obj_set_style_text_font(ui_Batinfo_Label16, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Batinfo_BarBAT = lv_bar_create(ui_Batinfo_Panel9);
lv_bar_set_value(ui_Batinfo_BarBAT, 25, LV_ANIM_OFF);
lv_bar_set_start_value(ui_Batinfo_BarBAT, 0, LV_ANIM_OFF);
lv_obj_set_width(ui_Batinfo_BarBAT, 178);
lv_obj_set_height(ui_Batinfo_BarBAT, 15);
lv_obj_set_x(ui_Batinfo_BarBAT, -3);
lv_obj_set_y(ui_Batinfo_BarBAT, -75);
lv_obj_set_align(ui_Batinfo_BarBAT, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_Batinfo_BarBAT, LV_OBJ_FLAG_CLICKABLE); /// Flags
ui_Batinfo_Label19 = lv_label_create(ui_Batinfo_Panel9);
lv_obj_set_width(ui_Batinfo_Label19, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Batinfo_Label19, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Batinfo_Label19, -97);
lv_obj_set_y(ui_Batinfo_Label19, -42);
lv_obj_set_align(ui_Batinfo_Label19, LV_ALIGN_CENTER);
lv_label_set_text(ui_Batinfo_Label19, "最大采样值:");
lv_obj_set_style_text_font(ui_Batinfo_Label19, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Batinfo_Label22 = lv_label_create(ui_Batinfo_Panel9);
lv_obj_set_width(ui_Batinfo_Label22, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Batinfo_Label22, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Batinfo_Label22, -112);
lv_obj_set_y(ui_Batinfo_Label22, 13);
lv_obj_set_align(ui_Batinfo_Label22, LV_ALIGN_CENTER);
lv_label_set_text(ui_Batinfo_Label22, "总电压:");
lv_obj_set_style_text_font(ui_Batinfo_Label22, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Batinfo_LabelValue = lv_label_create(ui_Batinfo_Panel9);
lv_obj_set_width(ui_Batinfo_LabelValue, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Batinfo_LabelValue, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Batinfo_LabelValue, -33);
lv_obj_set_y(ui_Batinfo_LabelValue, -42);
lv_obj_set_align(ui_Batinfo_LabelValue, LV_ALIGN_CENTER);
lv_label_set_text(ui_Batinfo_LabelValue, "4096");
ui_Batinfo_LabelVoltage = lv_label_create(ui_Batinfo_Panel9);
lv_obj_set_width(ui_Batinfo_LabelVoltage, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Batinfo_LabelVoltage, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Batinfo_LabelVoltage, -68);
lv_obj_set_y(ui_Batinfo_LabelVoltage, 14);
lv_obj_set_align(ui_Batinfo_LabelVoltage, LV_ALIGN_CENTER);
lv_label_set_text(ui_Batinfo_LabelVoltage, "4.2v");
ui_Batinfo_labelSampleVoltage = lv_label_create(ui_Batinfo_Panel9);
lv_obj_set_width(ui_Batinfo_labelSampleVoltage, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Batinfo_labelSampleVoltage, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Batinfo_labelSampleVoltage, -102);
lv_obj_set_y(ui_Batinfo_labelSampleVoltage, 55);
lv_obj_set_align(ui_Batinfo_labelSampleVoltage, LV_ALIGN_CENTER);
lv_label_set_text(ui_Batinfo_labelSampleVoltage, "采样电压:");
lv_obj_set_style_text_font(ui_Batinfo_labelSampleVoltage, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Batinfo_Label21 = lv_label_create(ui_Batinfo_Panel9);
lv_obj_set_width(ui_Batinfo_Label21, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Batinfo_Label21, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Batinfo_Label21, -79);
lv_obj_set_y(ui_Batinfo_Label21, -14);
lv_obj_set_align(ui_Batinfo_Label21, LV_ALIGN_CENTER);
lv_label_set_text(ui_Batinfo_Label21, "总电量:2500mAh");
lv_obj_set_style_text_font(ui_Batinfo_Label21, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Batinfo_labelSampleVolume = lv_label_create(ui_Batinfo_Panel9);
lv_obj_set_width(ui_Batinfo_labelSampleVolume, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Batinfo_labelSampleVolume, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Batinfo_labelSampleVolume, -101);
lv_obj_set_y(ui_Batinfo_labelSampleVolume, 77);
lv_obj_set_align(ui_Batinfo_labelSampleVolume, LV_ALIGN_CENTER);
lv_label_set_text(ui_Batinfo_labelSampleVolume, "采样电量:");
lv_obj_set_style_text_font(ui_Batinfo_labelSampleVolume, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Batinfo_valueVoltage = lv_label_create(ui_Batinfo_Panel9);
lv_obj_set_width(ui_Batinfo_valueVoltage, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Batinfo_valueVoltage, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Batinfo_valueVoltage, 18);
lv_obj_set_y(ui_Batinfo_valueVoltage, 54);
lv_obj_set_align(ui_Batinfo_valueVoltage, LV_ALIGN_CENTER);
lv_label_set_text(ui_Batinfo_valueVoltage, "3.3v");
lv_obj_set_style_text_color(ui_Batinfo_valueVoltage, lv_color_hex(0x808080), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Batinfo_valueVoltage, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Batinfo_valueVolume = lv_label_create(ui_Batinfo_Panel9);
lv_obj_set_width(ui_Batinfo_valueVolume, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Batinfo_valueVolume, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Batinfo_valueVolume, 19);
lv_obj_set_y(ui_Batinfo_valueVolume, 75);
lv_obj_set_align(ui_Batinfo_valueVolume, LV_ALIGN_CENTER);
lv_label_set_text(ui_Batinfo_valueVolume, "580mAh");
lv_obj_set_style_text_color(ui_Batinfo_valueVolume, lv_color_hex(0x808080), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Batinfo_valueVolume, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_add_event_cb(ui_Batinfo_Panel8, ui_event_Batinfo_Panel8, LV_EVENT_ALL, NULL);
}