2025-03-03 22:30:53 +08:00
|
|
|
// 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_settings_screen_init(void)
|
|
|
|
|
{
|
|
|
|
|
ui_settings = lv_obj_create(NULL);
|
|
|
|
|
lv_obj_clear_flag(ui_settings, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
|
|
|
|
2025-03-07 15:13:29 +08:00
|
|
|
ui_settings_settingHeader = lv_obj_create(ui_settings);
|
|
|
|
|
lv_obj_set_width(ui_settings_settingHeader, 320);
|
|
|
|
|
lv_obj_set_height(ui_settings_settingHeader, 50);
|
|
|
|
|
lv_obj_set_align(ui_settings_settingHeader, LV_ALIGN_TOP_MID);
|
|
|
|
|
lv_obj_clear_flag(ui_settings_settingHeader, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
|
|
|
lv_obj_set_style_radius(ui_settings_settingHeader, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_width(ui_settings_settingHeader, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
|
|
|
|
ui_settings_HomeImg = lv_img_create(ui_settings_settingHeader);
|
|
|
|
|
lv_img_set_src(ui_settings_HomeImg, &ui_img_981464361);
|
|
|
|
|
lv_obj_set_width(ui_settings_HomeImg, LV_SIZE_CONTENT); /// 40
|
|
|
|
|
lv_obj_set_height(ui_settings_HomeImg, LV_SIZE_CONTENT); /// 40
|
|
|
|
|
lv_obj_set_align(ui_settings_HomeImg, LV_ALIGN_LEFT_MID);
|
|
|
|
|
lv_obj_add_flag(ui_settings_HomeImg, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
|
|
|
|
|
lv_obj_clear_flag(ui_settings_HomeImg, LV_OBJ_FLAG_PRESS_LOCK | LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
|
|
|
|
|
|
|
|
|
ui_settings_Label11 = lv_label_create(ui_settings_settingHeader);
|
|
|
|
|
lv_obj_set_width(ui_settings_Label11, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_height(ui_settings_Label11, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_align(ui_settings_Label11, LV_ALIGN_BOTTOM_MID);
|
|
|
|
|
lv_label_set_text(ui_settings_Label11, "设置");
|
|
|
|
|
lv_obj_set_style_text_color(ui_settings_Label11, lv_color_hex(0x040000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_text_opa(ui_settings_Label11, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_text_font(ui_settings_Label11, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
|
|
|
|
ui_settings_StepPannel = lv_obj_create(ui_settings);
|
|
|
|
|
lv_obj_set_width(ui_settings_StepPannel, 320);
|
2025-03-12 14:00:26 +08:00
|
|
|
lv_obj_set_height(ui_settings_StepPannel, 430);
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_obj_set_x(ui_settings_StepPannel, 1);
|
|
|
|
|
lv_obj_set_y(ui_settings_StepPannel, 19);
|
|
|
|
|
lv_obj_set_align(ui_settings_StepPannel, LV_ALIGN_CENTER);
|
|
|
|
|
lv_obj_set_flex_flow(ui_settings_StepPannel, LV_FLEX_FLOW_COLUMN);
|
|
|
|
|
lv_obj_set_flex_align(ui_settings_StepPannel, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START);
|
|
|
|
|
lv_obj_add_flag(ui_settings_StepPannel, LV_OBJ_FLAG_EVENT_BUBBLE | LV_OBJ_FLAG_SCROLL_ONE); /// Flags
|
|
|
|
|
lv_obj_set_scrollbar_mode(ui_settings_StepPannel, LV_SCROLLBAR_MODE_ACTIVE);
|
|
|
|
|
lv_obj_set_scroll_dir(ui_settings_StepPannel, LV_DIR_VER);
|
|
|
|
|
lv_obj_set_style_radius(ui_settings_StepPannel, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_color(ui_settings_StepPannel, lv_color_hex(0xE6E6E6), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_opa(ui_settings_StepPannel, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_width(ui_settings_StepPannel, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_pad_left(ui_settings_StepPannel, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_pad_right(ui_settings_StepPannel, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
2025-03-12 08:13:34 +08:00
|
|
|
lv_obj_set_style_pad_top(ui_settings_StepPannel, 10, LV_PART_MAIN | LV_STATE_DEFAULT);
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_obj_set_style_pad_bottom(ui_settings_StepPannel, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
|
|
|
|
ui_settings_Bat = lv_obj_create(ui_settings_StepPannel);
|
|
|
|
|
lv_obj_set_width(ui_settings_Bat, 320);
|
|
|
|
|
lv_obj_set_height(ui_settings_Bat, 40);
|
|
|
|
|
lv_obj_set_align(ui_settings_Bat, LV_ALIGN_CENTER);
|
|
|
|
|
lv_obj_clear_flag(ui_settings_Bat, LV_OBJ_FLAG_PRESS_LOCK | LV_OBJ_FLAG_CLICK_FOCUSABLE | LV_OBJ_FLAG_SCROLLABLE |
|
2025-03-04 23:29:52 +08:00
|
|
|
LV_OBJ_FLAG_SCROLL_ELASTIC | LV_OBJ_FLAG_SCROLL_MOMENTUM | LV_OBJ_FLAG_SCROLL_CHAIN); /// Flags
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_obj_set_style_radius(ui_settings_Bat, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_color(ui_settings_Bat, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_opa(ui_settings_Bat, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_color(ui_settings_Bat, lv_color_hex(0xB4B4B4), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_opa(ui_settings_Bat, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_width(ui_settings_Bat, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_side(ui_settings_Bat, LV_BORDER_SIDE_BOTTOM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
2025-03-11 18:55:34 +08:00
|
|
|
ui_settings_wifi = lv_label_create(ui_settings_Bat);
|
|
|
|
|
lv_obj_set_width(ui_settings_wifi, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_height(ui_settings_wifi, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_align(ui_settings_wifi, LV_ALIGN_LEFT_MID);
|
|
|
|
|
lv_label_set_text(ui_settings_wifi, "WIFI");
|
|
|
|
|
lv_obj_set_style_text_font(ui_settings_wifi, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
|
|
|
|
ui_settings_toWifiPage = lv_label_create(ui_settings_Bat);
|
|
|
|
|
lv_obj_set_width(ui_settings_toWifiPage, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_height(ui_settings_toWifiPage, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_x(ui_settings_toWifiPage, 126);
|
|
|
|
|
lv_obj_set_y(ui_settings_toWifiPage, -1);
|
|
|
|
|
lv_obj_set_align(ui_settings_toWifiPage, LV_ALIGN_CENTER);
|
|
|
|
|
lv_label_set_text(ui_settings_toWifiPage, ">");
|
|
|
|
|
|
|
|
|
|
ui_settings_push = lv_obj_create(ui_settings_StepPannel);
|
|
|
|
|
lv_obj_set_width(ui_settings_push, 320);
|
|
|
|
|
lv_obj_set_height(ui_settings_push, 40);
|
|
|
|
|
lv_obj_set_align(ui_settings_push, LV_ALIGN_CENTER);
|
|
|
|
|
lv_obj_clear_flag(ui_settings_push, LV_OBJ_FLAG_PRESS_LOCK | LV_OBJ_FLAG_CLICK_FOCUSABLE | LV_OBJ_FLAG_SCROLLABLE |
|
2025-03-04 23:29:52 +08:00
|
|
|
LV_OBJ_FLAG_SCROLL_ELASTIC | LV_OBJ_FLAG_SCROLL_MOMENTUM | LV_OBJ_FLAG_SCROLL_CHAIN); /// Flags
|
2025-03-11 18:55:34 +08:00
|
|
|
lv_obj_set_style_radius(ui_settings_push, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_color(ui_settings_push, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_opa(ui_settings_push, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_color(ui_settings_push, lv_color_hex(0xB4B4B4), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_opa(ui_settings_push, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_width(ui_settings_push, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_side(ui_settings_push, LV_BORDER_SIDE_BOTTOM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
|
|
|
|
ui_settings_pushSwitch = lv_switch_create(ui_settings_push);
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_obj_set_width(ui_settings_pushSwitch, 49);
|
|
|
|
|
lv_obj_set_height(ui_settings_pushSwitch, 25);
|
|
|
|
|
lv_obj_set_x(ui_settings_pushSwitch, 125);
|
|
|
|
|
lv_obj_set_y(ui_settings_pushSwitch, -2);
|
|
|
|
|
lv_obj_set_align(ui_settings_pushSwitch, LV_ALIGN_CENTER);
|
|
|
|
|
|
2025-03-11 18:55:34 +08:00
|
|
|
ui_settings_dianchi1 = lv_label_create(ui_settings_push);
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_obj_set_width(ui_settings_dianchi1, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_height(ui_settings_dianchi1, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_align(ui_settings_dianchi1, LV_ALIGN_LEFT_MID);
|
|
|
|
|
lv_label_set_text(ui_settings_dianchi1, "推送");
|
|
|
|
|
lv_obj_set_style_text_font(ui_settings_dianchi1, &ui_font_MiSansN, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
2025-03-11 18:55:34 +08:00
|
|
|
ui_settings_light = lv_obj_create(ui_settings_StepPannel);
|
|
|
|
|
lv_obj_set_width(ui_settings_light, 320);
|
|
|
|
|
lv_obj_set_height(ui_settings_light, 40);
|
|
|
|
|
lv_obj_set_align(ui_settings_light, LV_ALIGN_CENTER);
|
|
|
|
|
lv_obj_clear_flag(ui_settings_light,
|
2025-03-07 15:13:29 +08:00
|
|
|
LV_OBJ_FLAG_PRESS_LOCK | LV_OBJ_FLAG_CLICK_FOCUSABLE | LV_OBJ_FLAG_SCROLLABLE | LV_OBJ_FLAG_SCROLL_ELASTIC |
|
|
|
|
|
LV_OBJ_FLAG_SCROLL_MOMENTUM | LV_OBJ_FLAG_SCROLL_CHAIN); /// Flags
|
2025-03-11 18:55:34 +08:00
|
|
|
lv_obj_set_style_radius(ui_settings_light, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_color(ui_settings_light, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_opa(ui_settings_light, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_color(ui_settings_light, lv_color_hex(0xB4B4B4), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_opa(ui_settings_light, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_width(ui_settings_light, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_side(ui_settings_light, LV_BORDER_SIDE_BOTTOM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
|
|
|
|
ui_settings_dianchi3 = lv_label_create(ui_settings_light);
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_obj_set_width(ui_settings_dianchi3, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_height(ui_settings_dianchi3, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_align(ui_settings_dianchi3, LV_ALIGN_LEFT_MID);
|
|
|
|
|
lv_label_set_text(ui_settings_dianchi3, "亮度");
|
|
|
|
|
lv_obj_set_style_text_font(ui_settings_dianchi3, &ui_font_MiSansN, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
2025-03-11 18:55:34 +08:00
|
|
|
ui_settings_lightSlider = lv_slider_create(ui_settings_light);
|
2025-03-07 17:42:37 +08:00
|
|
|
lv_slider_set_range(ui_settings_lightSlider, 0, 8192);
|
|
|
|
|
lv_slider_set_value(ui_settings_lightSlider, 7192, LV_ANIM_OFF);
|
2025-03-07 15:13:29 +08:00
|
|
|
if(lv_slider_get_mode(ui_settings_lightSlider) == LV_SLIDER_MODE_RANGE) lv_slider_set_left_value(
|
|
|
|
|
ui_settings_lightSlider, 0, LV_ANIM_OFF);
|
|
|
|
|
lv_obj_set_width(ui_settings_lightSlider, 211);
|
|
|
|
|
lv_obj_set_height(ui_settings_lightSlider, 10);
|
|
|
|
|
lv_obj_set_x(ui_settings_lightSlider, 42);
|
|
|
|
|
lv_obj_set_y(ui_settings_lightSlider, 1);
|
|
|
|
|
lv_obj_set_align(ui_settings_lightSlider, LV_ALIGN_CENTER);
|
|
|
|
|
|
2025-03-11 18:55:34 +08:00
|
|
|
ui_settings_devType = lv_obj_create(ui_settings_StepPannel);
|
|
|
|
|
lv_obj_set_width(ui_settings_devType, 320);
|
|
|
|
|
lv_obj_set_height(ui_settings_devType, 40);
|
|
|
|
|
lv_obj_set_align(ui_settings_devType, LV_ALIGN_CENTER);
|
|
|
|
|
lv_obj_clear_flag(ui_settings_devType,
|
2025-03-07 15:13:29 +08:00
|
|
|
LV_OBJ_FLAG_PRESS_LOCK | LV_OBJ_FLAG_CLICK_FOCUSABLE | LV_OBJ_FLAG_SCROLLABLE | LV_OBJ_FLAG_SCROLL_ELASTIC |
|
|
|
|
|
LV_OBJ_FLAG_SCROLL_MOMENTUM | LV_OBJ_FLAG_SCROLL_CHAIN); /// Flags
|
2025-03-11 18:55:34 +08:00
|
|
|
lv_obj_set_style_radius(ui_settings_devType, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_color(ui_settings_devType, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_opa(ui_settings_devType, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_color(ui_settings_devType, lv_color_hex(0xB4B4B4), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_opa(ui_settings_devType, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_width(ui_settings_devType, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_side(ui_settings_devType, LV_BORDER_SIDE_BOTTOM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
|
|
|
|
ui_settings_deviceDropdown = lv_dropdown_create(ui_settings_devType);
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_dropdown_set_options(ui_settings_deviceDropdown, "Spirit-3\nSpirit-6\nYU-Lite8");
|
|
|
|
|
lv_obj_set_width(ui_settings_deviceDropdown, 150);
|
|
|
|
|
lv_obj_set_height(ui_settings_deviceDropdown, LV_SIZE_CONTENT); /// 30
|
|
|
|
|
lv_obj_set_x(ui_settings_deviceDropdown, 78);
|
|
|
|
|
lv_obj_set_y(ui_settings_deviceDropdown, 0);
|
|
|
|
|
lv_obj_set_align(ui_settings_deviceDropdown, LV_ALIGN_CENTER);
|
|
|
|
|
lv_obj_add_flag(ui_settings_deviceDropdown, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
|
|
|
|
|
|
2025-03-11 18:55:34 +08:00
|
|
|
ui_settings_testType = lv_label_create(ui_settings_devType);
|
|
|
|
|
lv_obj_set_width(ui_settings_testType, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_height(ui_settings_testType, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_align(ui_settings_testType, LV_ALIGN_LEFT_MID);
|
|
|
|
|
lv_label_set_text(ui_settings_testType, "测试设备类型");
|
|
|
|
|
lv_obj_set_style_text_font(ui_settings_testType, &ui_font_MiSansN, LV_PART_MAIN | LV_STATE_DEFAULT);
|
2025-03-07 15:13:29 +08:00
|
|
|
|
2025-03-11 18:55:34 +08:00
|
|
|
ui_settings_BatState = lv_obj_create(ui_settings_StepPannel);
|
|
|
|
|
lv_obj_set_width(ui_settings_BatState, 320);
|
|
|
|
|
lv_obj_set_height(ui_settings_BatState, 40);
|
|
|
|
|
lv_obj_set_align(ui_settings_BatState, LV_ALIGN_CENTER);
|
|
|
|
|
lv_obj_clear_flag(ui_settings_BatState,
|
2025-03-07 15:13:29 +08:00
|
|
|
LV_OBJ_FLAG_PRESS_LOCK | LV_OBJ_FLAG_CLICK_FOCUSABLE | LV_OBJ_FLAG_SCROLLABLE | LV_OBJ_FLAG_SCROLL_ELASTIC |
|
|
|
|
|
LV_OBJ_FLAG_SCROLL_MOMENTUM | LV_OBJ_FLAG_SCROLL_CHAIN); /// Flags
|
2025-03-11 18:55:34 +08:00
|
|
|
lv_obj_set_style_radius(ui_settings_BatState, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_color(ui_settings_BatState, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_opa(ui_settings_BatState, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_color(ui_settings_BatState, lv_color_hex(0xB4B4B4), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_opa(ui_settings_BatState, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_width(ui_settings_BatState, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_side(ui_settings_BatState, LV_BORDER_SIDE_BOTTOM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
|
|
|
|
ui_settings_Label10 = lv_label_create(ui_settings_BatState);
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_obj_set_width(ui_settings_Label10, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_height(ui_settings_Label10, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_x(ui_settings_Label10, 126);
|
|
|
|
|
lv_obj_set_y(ui_settings_Label10, -1);
|
|
|
|
|
lv_obj_set_align(ui_settings_Label10, LV_ALIGN_CENTER);
|
|
|
|
|
lv_label_set_text(ui_settings_Label10, ">");
|
|
|
|
|
|
2025-03-11 18:55:34 +08:00
|
|
|
ui_settings_dianchi6 = lv_label_create(ui_settings_BatState);
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_obj_set_width(ui_settings_dianchi6, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_height(ui_settings_dianchi6, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_x(ui_settings_dianchi6, 4);
|
|
|
|
|
lv_obj_set_y(ui_settings_dianchi6, 1);
|
|
|
|
|
lv_obj_set_align(ui_settings_dianchi6, LV_ALIGN_LEFT_MID);
|
|
|
|
|
lv_label_set_text(ui_settings_dianchi6, "电池状态");
|
|
|
|
|
lv_obj_set_style_text_font(ui_settings_dianchi6, &ui_font_MiSansN, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
2025-03-11 18:55:34 +08:00
|
|
|
ui_settings_sdcard = lv_obj_create(ui_settings_StepPannel);
|
|
|
|
|
lv_obj_set_width(ui_settings_sdcard, 320);
|
|
|
|
|
lv_obj_set_height(ui_settings_sdcard, 40);
|
|
|
|
|
lv_obj_set_x(ui_settings_sdcard, 4);
|
|
|
|
|
lv_obj_set_y(ui_settings_sdcard, -76);
|
|
|
|
|
lv_obj_set_align(ui_settings_sdcard, LV_ALIGN_CENTER);
|
|
|
|
|
lv_obj_clear_flag(ui_settings_sdcard,
|
2025-03-07 15:13:29 +08:00
|
|
|
LV_OBJ_FLAG_PRESS_LOCK | LV_OBJ_FLAG_CLICK_FOCUSABLE | LV_OBJ_FLAG_SCROLLABLE | LV_OBJ_FLAG_SCROLL_ELASTIC |
|
|
|
|
|
LV_OBJ_FLAG_SCROLL_MOMENTUM | LV_OBJ_FLAG_SCROLL_CHAIN); /// Flags
|
2025-03-11 18:55:34 +08:00
|
|
|
lv_obj_set_style_radius(ui_settings_sdcard, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_color(ui_settings_sdcard, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_opa(ui_settings_sdcard, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_color(ui_settings_sdcard, lv_color_hex(0xB4B4B4), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_opa(ui_settings_sdcard, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_width(ui_settings_sdcard, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_side(ui_settings_sdcard, LV_BORDER_SIDE_BOTTOM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
|
|
|
|
ui_settings_dianchi4 = lv_label_create(ui_settings_sdcard);
|
|
|
|
|
lv_obj_set_width(ui_settings_dianchi4, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_height(ui_settings_dianchi4, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_x(ui_settings_dianchi4, 6);
|
|
|
|
|
lv_obj_set_y(ui_settings_dianchi4, 0);
|
|
|
|
|
lv_obj_set_align(ui_settings_dianchi4, LV_ALIGN_LEFT_MID);
|
|
|
|
|
lv_label_set_text(ui_settings_dianchi4, "设备信息");
|
|
|
|
|
lv_obj_set_style_text_font(ui_settings_dianchi4, &ui_font_MiSansN, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
|
|
|
|
ui_settings_Label20 = lv_label_create(ui_settings_sdcard);
|
|
|
|
|
lv_obj_set_width(ui_settings_Label20, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_height(ui_settings_Label20, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_x(ui_settings_Label20, 126);
|
|
|
|
|
lv_obj_set_y(ui_settings_Label20, -1);
|
|
|
|
|
lv_obj_set_align(ui_settings_Label20, LV_ALIGN_CENTER);
|
|
|
|
|
lv_label_set_text(ui_settings_Label20, ">");
|
|
|
|
|
|
|
|
|
|
ui_settings_ToSDCard = lv_obj_create(ui_settings_StepPannel);
|
|
|
|
|
lv_obj_set_width(ui_settings_ToSDCard, 320);
|
|
|
|
|
lv_obj_set_height(ui_settings_ToSDCard, 40);
|
|
|
|
|
lv_obj_set_x(ui_settings_ToSDCard, 4);
|
|
|
|
|
lv_obj_set_y(ui_settings_ToSDCard, -76);
|
|
|
|
|
lv_obj_set_align(ui_settings_ToSDCard, LV_ALIGN_CENTER);
|
|
|
|
|
lv_obj_clear_flag(ui_settings_ToSDCard,
|
|
|
|
|
LV_OBJ_FLAG_PRESS_LOCK | LV_OBJ_FLAG_CLICK_FOCUSABLE | LV_OBJ_FLAG_SCROLLABLE | LV_OBJ_FLAG_SCROLL_ELASTIC |
|
|
|
|
|
LV_OBJ_FLAG_SCROLL_MOMENTUM | LV_OBJ_FLAG_SCROLL_CHAIN); /// Flags
|
|
|
|
|
lv_obj_set_style_radius(ui_settings_ToSDCard, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_color(ui_settings_ToSDCard, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_bg_opa(ui_settings_ToSDCard, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_color(ui_settings_ToSDCard, lv_color_hex(0xB4B4B4), LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_opa(ui_settings_ToSDCard, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_width(ui_settings_ToSDCard, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
lv_obj_set_style_border_side(ui_settings_ToSDCard, LV_BORDER_SIDE_BOTTOM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
|
|
|
|
ui_settings_dianchi2 = lv_label_create(ui_settings_ToSDCard);
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_obj_set_width(ui_settings_dianchi2, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_height(ui_settings_dianchi2, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_x(ui_settings_dianchi2, 6);
|
|
|
|
|
lv_obj_set_y(ui_settings_dianchi2, 0);
|
|
|
|
|
lv_obj_set_align(ui_settings_dianchi2, LV_ALIGN_LEFT_MID);
|
2025-03-11 18:55:34 +08:00
|
|
|
lv_label_set_text(ui_settings_dianchi2, "SD卡");
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_obj_set_style_text_font(ui_settings_dianchi2, &ui_font_MiSansN, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
2025-03-11 18:55:34 +08:00
|
|
|
ui_settings_Label13 = lv_label_create(ui_settings_ToSDCard);
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_obj_set_width(ui_settings_Label13, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_height(ui_settings_Label13, LV_SIZE_CONTENT); /// 1
|
|
|
|
|
lv_obj_set_x(ui_settings_Label13, 126);
|
|
|
|
|
lv_obj_set_y(ui_settings_Label13, -1);
|
|
|
|
|
lv_obj_set_align(ui_settings_Label13, LV_ALIGN_CENTER);
|
|
|
|
|
lv_label_set_text(ui_settings_Label13, ">");
|
|
|
|
|
|
|
|
|
|
ui_settings_TextArea2 = lv_textarea_create(ui_settings_StepPannel);
|
|
|
|
|
lv_obj_set_width(ui_settings_TextArea2, 319);
|
2025-03-12 08:13:34 +08:00
|
|
|
lv_obj_set_height(ui_settings_TextArea2, LV_SIZE_CONTENT); /// 124
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_obj_set_x(ui_settings_TextArea2, 3);
|
|
|
|
|
lv_obj_set_y(ui_settings_TextArea2, 0);
|
|
|
|
|
lv_obj_set_align(ui_settings_TextArea2, LV_ALIGN_CENTER);
|
|
|
|
|
lv_textarea_set_placeholder_text(ui_settings_TextArea2, "来自服务器的反馈消息");
|
2025-03-12 08:13:34 +08:00
|
|
|
lv_textarea_set_one_line(ui_settings_TextArea2, true);
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_obj_set_style_text_font(ui_settings_TextArea2, &ui_font_MiSansN, LV_PART_MAIN | LV_STATE_DEFAULT);
|
|
|
|
|
|
|
|
|
|
lv_obj_add_event_cb(ui_settings_HomeImg, ui_event_settings_HomeImg, LV_EVENT_ALL, NULL);
|
|
|
|
|
lv_obj_add_event_cb(ui_settings_settingHeader, ui_event_settings_settingHeader, LV_EVENT_ALL, NULL);
|
|
|
|
|
lv_obj_add_event_cb(ui_settings_Bat, ui_event_settings_Bat, LV_EVENT_ALL, NULL);
|
2025-03-11 18:55:34 +08:00
|
|
|
lv_obj_add_event_cb(ui_settings_push, ui_event_settings_push, LV_EVENT_ALL, NULL);
|
2025-03-07 15:13:29 +08:00
|
|
|
lv_obj_add_event_cb(ui_settings_lightSlider, ui_event_settings_lightSlider, LV_EVENT_ALL, NULL);
|
2025-03-08 14:45:49 +08:00
|
|
|
lv_obj_add_event_cb(ui_settings_deviceDropdown, ui_event_settings_deviceDropdown, LV_EVENT_ALL, NULL);
|
2025-03-11 18:55:34 +08:00
|
|
|
lv_obj_add_event_cb(ui_settings_BatState, ui_event_settings_BatState, LV_EVENT_ALL, NULL);
|
|
|
|
|
lv_obj_add_event_cb(ui_settings_sdcard, ui_event_settings_sdcard, LV_EVENT_ALL, NULL);
|
|
|
|
|
lv_obj_add_event_cb(ui_settings_ToSDCard, ui_event_settings_ToSDCard, LV_EVENT_ALL, NULL);
|
2025-03-03 22:30:53 +08:00
|
|
|
|
|
|
|
|
}
|