first commit

This commit is contained in:
wen
2025-09-30 13:01:24 +08:00
parent d8d17c8076
commit ec83999cef
40 changed files with 13830 additions and 136 deletions

View File

@@ -190,6 +190,26 @@ static void setting_dispinfobtn_1_event_handler (lv_event_t *e)
break;
}
}
static void setting_dateinfobtn_1_event_handler (lv_event_t *e)
{
lv_event_code_t code = lv_event_get_code(e);
switch (code) {
case LV_EVENT_CLICKED:
{
LOG_I("setting_dateinfobtn_1_event_handler");
if(!guider_ui.dateinfopage)
{
setup_scr_dateinfopage(&guider_ui);
}
lv_scr_load(guider_ui.dateinfopage);
break;
}
default:
break;
}
}
static void setting_langinfobtn_1_event_handler (lv_event_t *e)
{
lv_event_code_t code = lv_event_get_code(e);
@@ -275,6 +295,7 @@ void events_init_setting(lv_ui *ui)
lv_obj_add_event_cb(ui->setting_retrunbtn, setting_retrunbtn_event_handler, LV_EVENT_ALL, ui);
lv_obj_add_event_cb(ui->setting_mainfobtn_1, setting_mainfobtn_1_event_handler, LV_EVENT_ALL, ui);
lv_obj_add_event_cb(ui->setting_dispinfobtn_1, setting_dispinfobtn_1_event_handler, LV_EVENT_ALL, ui);
lv_obj_add_event_cb(ui->setting_dateinfobtn_1, setting_dateinfobtn_1_event_handler, LV_EVENT_ALL, ui);
lv_obj_add_event_cb(ui->setting_langinfobtn_1, setting_langinfobtn_1_event_handler, LV_EVENT_ALL, ui);
lv_obj_add_event_cb(ui->setting_smartconfibtn_1, setting_smartconfibtn_1_event_handler, LV_EVENT_ALL, ui);
lv_obj_add_event_cb(ui->setting_firstinfobtn_1, setting_firstinfobtn_1_event_handler, LV_EVENT_ALL, ui);
@@ -341,6 +362,167 @@ void events_init_mianinfopage(lv_ui *ui)
lv_obj_add_event_cb(ui->mianinfopage_restartbtn, mianinfopage_restartbtn_event_handler, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui->mianinfopage_factorybtn, mianinfopage_factorybtn_event_handler, LV_EVENT_ALL, NULL);
}
static void dateinfopage_retrunbtn_event_handler (lv_event_t *e)
{
lv_event_code_t code = lv_event_get_code(e);
switch (code) {
case LV_EVENT_RELEASED:
{
LOG_I("dateinfopage_retrunbtn_event_handler");
if(!guider_ui.setting)
{
setup_scr_setting(&guider_ui);
}
lv_scr_load(guider_ui.setting);
if(guider_ui.dateinfopage)
{
lv_obj_del(guider_ui.dateinfopage);
guider_ui.dateinfopage = NULL;
}
break;
}
default:
break;
}
}
static void dateinfopage_sw_1_event_handler (lv_event_t *e)
{
lv_event_code_t code = lv_event_get_code(e);
switch (code) {
case LV_EVENT_VALUE_CHANGED:
{
LOG_I("dateinfopage_sw_1_event_handler");
custom_datetime_key_status(1,LV_EVENT_CLICKED);
break;
}
default:
break;
}
}
static void dateinfopage_datebtn_event_handler (lv_event_t *e)
{
lv_event_code_t code = lv_event_get_code(e);
switch (code) {
case LV_EVENT_RELEASED:
{
LOG_I("dateinfopage_datebtn_event_handler");
if(!guider_ui.datesetpage)
{
setup_scr_datesetpage(&guider_ui);
}
lv_scr_load(guider_ui.datesetpage);
break;
}
default:
break;
}
}
static void dateinfopage_timebtn_event_handler (lv_event_t *e)
{
lv_event_code_t code = lv_event_get_code(e);
switch (code) {
case LV_EVENT_RELEASED:
{
LOG_I("dateinfopage_timebtn_event_handler");
if(!guider_ui.datesetpage)
{
setup_scr_datesetpage(&guider_ui);
}
lv_scr_load(guider_ui.datesetpage);
break;
}
default:
break;
}
}
void events_init_dateinfopage(lv_ui *ui)
{
lv_obj_add_event_cb(ui->dateinfopage_retrunbtn, dateinfopage_retrunbtn_event_handler, LV_EVENT_ALL, ui);
lv_obj_add_event_cb(ui->dateinfopage_sw_1, dateinfopage_sw_1_event_handler, LV_EVENT_ALL, ui);
lv_obj_add_event_cb(ui->dateinfopage_datebtn, dateinfopage_datebtn_event_handler, LV_EVENT_ALL, ui);
lv_obj_add_event_cb(ui->dateinfopage_timebtn, dateinfopage_timebtn_event_handler, LV_EVENT_ALL, ui);
}
static void datesetpage_retrunbtn_event_handler (lv_event_t *e)
{
lv_event_code_t code = lv_event_get_code(e);
switch (code) {
case LV_EVENT_CLICKED:
{
LOG_I("datesetpage_retrunbtn_event_handler");
if(!guider_ui.dateinfopage)
{
setup_scr_dateinfopage(&guider_ui);
}
lv_scr_load(guider_ui.dateinfopage);
if(guider_ui.datesetpage)
{
lv_obj_del(guider_ui.datesetpage);
guider_ui.datesetpage = NULL;
}
break;
}
default:
break;
}
}
static void datesetpage_changebtn_event_handler (lv_event_t *e)
{
lv_event_code_t code = lv_event_get_code(e);
switch (code) {
case LV_EVENT_CLICKED:
{
LOG_I("datesetpage_changebtn_event_handler");
custom_datetime_key_status(2,LV_EVENT_CLICKED);
break;
}
default:
break;
}
}
static void datesetpage_cancelbtn_event_handler (lv_event_t *e)
{
lv_event_code_t code = lv_event_get_code(e);
switch (code) {
case LV_EVENT_CLICKED:
{
LOG_I("datesetpage_cancelbtn_event_handler");
if(!guider_ui.dateinfopage)
{
setup_scr_dateinfopage(&guider_ui);
}
lv_scr_load(guider_ui.dateinfopage);
if(guider_ui.datesetpage)
{
lv_obj_del(guider_ui.datesetpage);
guider_ui.datesetpage = NULL;
}
break;
}
default:
break;
}
}
void events_init_datesetpage(lv_ui *ui)
{
lv_obj_add_event_cb(ui->datesetpage_retrunbtn, datesetpage_retrunbtn_event_handler, LV_EVENT_ALL, ui);
lv_obj_add_event_cb(ui->datesetpage_changebtn, datesetpage_changebtn_event_handler, LV_EVENT_ALL, ui);
lv_obj_add_event_cb(ui->datesetpage_cancelbtn, datesetpage_cancelbtn_event_handler, LV_EVENT_ALL, ui);
}
static void langinfopage_retrunbtn_event_handler (lv_event_t *e)
{
lv_event_code_t code = lv_event_get_code(e);

View File

@@ -21,8 +21,10 @@ void events_init(lv_ui *ui);
void events_init_screen_main(lv_ui *ui);
void events_init_setting(lv_ui *ui);
void events_init_mianinfopage(lv_ui *ui);
void events_init_langinfopage(lv_ui *ui);
void events_init_displayinfopage(lv_ui *ui);
void events_init_dateinfopage(lv_ui *ui);
void events_init_datesetpage(lv_ui *ui);
void events_init_langinfopage(lv_ui *ui);
void events_init_smartinfopage(lv_ui *ui);
void events_init_firstinfopage(lv_ui *ui);
void events_init_relayinfopage(lv_ui *ui);

Binary file not shown.

After

Width:  |  Height:  |  Size: 923 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -0,0 +1,430 @@
/*
* Copyright 2025 NXP
* NXP Confidential and Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include "lvgl.h"
#include "gui_guider.h"
#include "events_init.h"
#include "widgets_init.h"
#include "custom.h"
/*
时间界面逻辑
1 进页面 显示最新时间 3个状态同步更新
同步自动选择的开关状态 ok
同步2个日期按钮的 允许/禁用状态 ok
同步最新时间显示 ok
2 依据是开关状态:
选择关闭自动更新,则允许点击按钮
如果跳转到更新时区 年月日时分界面
1 显示最新的时间和时区
2 如果点击更改,时间当成本地时间 通过utc+- 转为utc时间 并保存时区
选择开启自动更新 禁用按钮点击,
立即向zigbee查询时间并依据zigbee下发的utc时间和当地时间计算出时区 并保存时区 ok
*/
void setup_scr_dateinfopage(lv_ui *ui)
{
time_t now;
struct tm timeinfo;
time(&now);
localtime_r(&now, &timeinfo);
LOG_I("timezone utc:%d",tz_get());
LOG_I("time==%d:%d:%d:%d:%02d:%02d:%02d:%02d:%02d",
timeinfo.tm_isdst, //是否为夏时制
timeinfo.tm_yday, //一年过去的天数
timeinfo.tm_wday, //星期1对应星期一
timeinfo.tm_year+1900, //年距离1900年的差值默认是70
timeinfo.tm_mon+1, //日期从0开始 0~11
timeinfo.tm_mday, //日期从1开始
timeinfo.tm_hour, //小时
timeinfo.tm_min, //分钟
timeinfo.tm_sec); //秒钟
//Write codes dateinfopage
ui->dateinfopage = lv_obj_create(NULL);
lv_obj_set_size(ui->dateinfopage, 480, 480);
lv_obj_set_scrollbar_mode(ui->dateinfopage, LV_SCROLLBAR_MODE_OFF);
//Write style for dateinfopage, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->dateinfopage, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->dateinfopage, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->dateinfopage, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes dateinfopage_returnbg
ui->dateinfopage_returnbg = lv_img_create(ui->dateinfopage);
lv_obj_add_flag(ui->dateinfopage_returnbg, LV_OBJ_FLAG_CLICKABLE);
lv_img_set_src(ui->dateinfopage_returnbg, LVGL_PATH(returnbg.png));
lv_img_set_pivot(ui->dateinfopage_returnbg, 50,50);
lv_img_set_angle(ui->dateinfopage_returnbg, 0);
lv_obj_set_pos(ui->dateinfopage_returnbg, 23, 27);
lv_obj_set_size(ui->dateinfopage_returnbg, 14, 26);
//Write style for dateinfopage_returnbg, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_img_opa(ui->dateinfopage_returnbg, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes dateinfopage_retrunbtn
ui->dateinfopage_retrunbtn = lv_btn_create(ui->dateinfopage);
//ui->dateinfopage_retrunbtn_label = lv_label_create(ui->dateinfopage_retrunbtn);
//lv_label_set_text(ui->dateinfopage_retrunbtn_label, "");
//lv_label_set_long_mode(ui->dateinfopage_retrunbtn_label, LV_LABEL_LONG_WRAP);
//lv_obj_align(ui->dateinfopage_retrunbtn_label, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_pad_all(ui->dateinfopage_retrunbtn, 0, LV_STATE_DEFAULT);
//lv_obj_set_width(ui->displayinfopage_retrunbtn_label, LV_PCT(100));
lv_obj_set_pos(ui->dateinfopage_retrunbtn, 8, 8);
lv_obj_set_size(ui->dateinfopage_retrunbtn, 60, 60);
//Write style for displayinfopage_retrunbtn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->dateinfopage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->dateinfopage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->dateinfopage_retrunbtn, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->dateinfopage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_color(ui->dateinfopage_retrunbtn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_font(ui->dateinfopage_retrunbtn, &lv_font_albbhptR_16, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_opa(ui->dateinfopage_retrunbtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_align(ui->dateinfopage_retrunbtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes dateinfopage_sw_1
ui->dateinfopage_sw_1 = lv_switch_create(ui->dateinfopage);
lv_obj_set_pos(ui->dateinfopage_sw_1, 390, 78);
lv_obj_set_size(ui->dateinfopage_sw_1, 60, 30);
//Write style for dateinfopage_sw_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->dateinfopage_sw_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->dateinfopage_sw_1, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->dateinfopage_sw_1, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_color(ui->dateinfopage_sw_1, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_main_stop(ui->dateinfopage_sw_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_stop(ui->dateinfopage_sw_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->dateinfopage_sw_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->dateinfopage_sw_1, 100, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->dateinfopage_sw_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style for dateinfopage_sw_1, Part: LV_PART_INDICATOR, State: LV_STATE_CHECKED.
lv_obj_set_style_bg_opa(ui->dateinfopage_sw_1, 255, LV_PART_INDICATOR|LV_STATE_CHECKED);
lv_obj_set_style_bg_color(ui->dateinfopage_sw_1, lv_color_hex(0x374c69), LV_PART_INDICATOR|LV_STATE_CHECKED);
lv_obj_set_style_bg_grad_dir(ui->dateinfopage_sw_1, LV_GRAD_DIR_VER, LV_PART_INDICATOR|LV_STATE_CHECKED);
lv_obj_set_style_bg_grad_color(ui->dateinfopage_sw_1, lv_color_hex(0x374c69), LV_PART_INDICATOR|LV_STATE_CHECKED);
lv_obj_set_style_bg_main_stop(ui->dateinfopage_sw_1, 0, LV_PART_INDICATOR|LV_STATE_CHECKED);
lv_obj_set_style_bg_grad_stop(ui->dateinfopage_sw_1, 255, LV_PART_INDICATOR|LV_STATE_CHECKED);
lv_obj_set_style_border_width(ui->dateinfopage_sw_1, 0, LV_PART_INDICATOR|LV_STATE_CHECKED);
//Write style for dateinfopage_sw_1, Part: LV_PART_KNOB, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->dateinfopage_sw_1, 255, LV_PART_KNOB|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->dateinfopage_sw_1, lv_color_hex(0xeb950f), LV_PART_KNOB|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->dateinfopage_sw_1, LV_GRAD_DIR_VER, LV_PART_KNOB|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_color(ui->dateinfopage_sw_1, lv_color_hex(0xef950f), LV_PART_KNOB|LV_STATE_DEFAULT);
lv_obj_set_style_bg_main_stop(ui->dateinfopage_sw_1, 0, LV_PART_KNOB|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_stop(ui->dateinfopage_sw_1, 255, LV_PART_KNOB|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->dateinfopage_sw_1, 0, LV_PART_KNOB|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->dateinfopage_sw_1, 100, LV_PART_KNOB|LV_STATE_DEFAULT);
if(GET_nvs_Sys_Info_autoupdatetime())
{
lv_obj_add_state(ui->dateinfopage_sw_1, LV_STATE_CHECKED);//on
}
else
{
lv_obj_clear_state(ui->dateinfopage_sw_1, LV_STATE_CHECKED);//off
}
//Write codes dateinfopage_label_2
ui->dateinfopage_label_2 = lv_label_create(ui->dateinfopage);
//lv_label_set_text(ui->dateinfopage_label_2, "Set time Automatically");
lv_label_set_text(ui->dateinfopage_label_2, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockauto]);
lv_label_set_long_mode(ui->dateinfopage_label_2, LV_LABEL_LONG_WRAP);
lv_obj_set_pos(ui->dateinfopage_label_2, 38, 80);
lv_obj_set_size(ui->dateinfopage_label_2, 250, 24);
//Write style for dateinfopage_label_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->dateinfopage_label_2, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->dateinfopage_label_2, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->dateinfopage_label_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_letter_space(ui->dateinfopage_label_2, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_line_space(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->dateinfopage_label_2, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->dateinfopage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes dateinfopage_datecont
ui->dateinfopage_datecont = lv_obj_create(ui->dateinfopage);
lv_obj_set_pos(ui->dateinfopage_datecont, 17, 127);
lv_obj_set_size(ui->dateinfopage_datecont, 443, 50);
lv_obj_set_scrollbar_mode(ui->dateinfopage_datecont, LV_SCROLLBAR_MODE_OFF);
//Write style for dateinfopage_datecont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->dateinfopage_datecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->dateinfopage_datecont, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->dateinfopage_datecont, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->dateinfopage_datecont, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->dateinfopage_datecont, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_color(ui->dateinfopage_datecont, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_main_stop(ui->dateinfopage_datecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_stop(ui->dateinfopage_datecont, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->dateinfopage_datecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->dateinfopage_datecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->dateinfopage_datecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->dateinfopage_datecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->dateinfopage_datecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes dateinfopage_img_2
ui->dateinfopage_img_2 = lv_img_create(ui->dateinfopage_datecont);
lv_obj_add_flag(ui->dateinfopage_img_2, LV_OBJ_FLAG_CLICKABLE);
lv_img_set_src(ui->dateinfopage_img_2, LVGL_PATH(nextpagebg.png));
lv_img_set_pivot(ui->dateinfopage_img_2, 0,0);
lv_img_set_angle(ui->dateinfopage_img_2, 0);
lv_obj_set_pos(ui->dateinfopage_img_2, 422, 17);
lv_obj_set_size(ui->dateinfopage_img_2, 14, 22);
//Write style for dateinfopage_img_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_img_opa(ui->dateinfopage_img_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes dateinfopage_datelabel
ui->dateinfopage_datelabel = lv_label_create(ui->dateinfopage_datecont);
// lv_label_set_text(ui->dateinfopage_datelabel, "Date");
lv_label_set_text(ui->dateinfopage_datelabel, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockDate]);
lv_label_set_long_mode(ui->dateinfopage_datelabel, LV_LABEL_LONG_WRAP);
lv_obj_set_pos(ui->dateinfopage_datelabel, 21, 0);
lv_obj_set_size(ui->dateinfopage_datelabel, 50, 24);
//Write style for dateinfopage_datelabel, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->dateinfopage_datelabel, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->dateinfopage_datelabel, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->dateinfopage_datelabel, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_letter_space(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_line_space(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->dateinfopage_datelabel, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->dateinfopage_datelabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes dateinfopage_datetxtlabel
ui->dateinfopage_datetxtlabel = lv_label_create(ui->dateinfopage_datecont);
//lv_label_set_text(ui->dateinfopage_datetxtlabel, "January 1, 2023");
if(GET_nvs_Sys_Info_language()==LANG_CH)
{
lv_label_set_text_fmt(ui->dateinfopage_datetxtlabel,"%d年%d月%d日",timeinfo.tm_year+1900,timeinfo.tm_mon+1,timeinfo.tm_mday);
}
else
{
lv_label_set_text_fmt(ui->dateinfopage_datetxtlabel,"%s %d, %d",Menu_monList[timeinfo.tm_mon+1],timeinfo.tm_mday,timeinfo.tm_year+1900);
}
lv_label_set_long_mode(ui->dateinfopage_datetxtlabel, LV_LABEL_LONG_WRAP);
lv_obj_set_pos(ui->dateinfopage_datetxtlabel, 21, 24);
lv_obj_set_size(ui->dateinfopage_datetxtlabel, 200, 24);
//Write style for dateinfopage_datetxtlabel, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->dateinfopage_datetxtlabel, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->dateinfopage_datetxtlabel, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->dateinfopage_datetxtlabel, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_letter_space(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_line_space(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->dateinfopage_datetxtlabel, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->dateinfopage_datetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes dateinfopage_datebtn
ui->dateinfopage_datebtn = lv_btn_create(ui->dateinfopage_datecont);
ui->dateinfopage_datebtn_label = lv_label_create(ui->dateinfopage_datebtn);
lv_label_set_text(ui->dateinfopage_datebtn_label, "");
lv_label_set_long_mode(ui->dateinfopage_datebtn_label, LV_LABEL_LONG_WRAP);
lv_obj_align(ui->dateinfopage_datebtn_label, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_pad_all(ui->dateinfopage_datebtn, 0, LV_STATE_DEFAULT);
lv_obj_set_width(ui->dateinfopage_datebtn_label, LV_PCT(100));
lv_obj_set_pos(ui->dateinfopage_datebtn, 0, 0);
lv_obj_set_size(ui->dateinfopage_datebtn, 443, 50);
//Write style for dateinfopage_datebtn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->dateinfopage_datebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->dateinfopage_datebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->dateinfopage_datebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->dateinfopage_datebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->dateinfopage_datebtn, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->dateinfopage_datebtn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->dateinfopage_datebtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->dateinfopage_datebtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style for dateinfopage_datebtn, Part: LV_PART_MAIN, State: LV_STATE_DISABLED.
lv_obj_set_style_bg_opa(ui->dateinfopage_datebtn, 202, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_bg_color(ui->dateinfopage_datebtn, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_bg_grad_dir(ui->dateinfopage_datebtn, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_bg_grad_color(ui->dateinfopage_datebtn, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_bg_main_stop(ui->dateinfopage_datebtn, 0, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_bg_grad_stop(ui->dateinfopage_datebtn, 255, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_border_width(ui->dateinfopage_datebtn, 0, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_radius(ui->dateinfopage_datebtn, 10, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_shadow_width(ui->dateinfopage_datebtn, 0, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_text_color(ui->dateinfopage_datebtn, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_text_font(ui->dateinfopage_datebtn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_text_opa(ui->dateinfopage_datebtn, 255, LV_PART_MAIN|LV_STATE_DISABLED);
//Write codes dateinfopage_timecont
ui->dateinfopage_timecont = lv_obj_create(ui->dateinfopage);
lv_obj_set_pos(ui->dateinfopage_timecont, 17, 182);
lv_obj_set_size(ui->dateinfopage_timecont, 443, 50);
lv_obj_set_scrollbar_mode(ui->dateinfopage_timecont, LV_SCROLLBAR_MODE_OFF);
//Write style for dateinfopage_timecont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->dateinfopage_timecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->dateinfopage_timecont, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->dateinfopage_timecont, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->dateinfopage_timecont, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->dateinfopage_timecont, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_color(ui->dateinfopage_timecont, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_main_stop(ui->dateinfopage_timecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_stop(ui->dateinfopage_timecont, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->dateinfopage_timecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->dateinfopage_timecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->dateinfopage_timecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->dateinfopage_timecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->dateinfopage_timecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes dateinfopage_img_3
ui->dateinfopage_img_3 = lv_img_create(ui->dateinfopage_timecont);
lv_obj_add_flag(ui->dateinfopage_img_3, LV_OBJ_FLAG_CLICKABLE);
lv_img_set_src(ui->dateinfopage_img_3, LVGL_PATH(nextpagebg.png));
lv_img_set_pivot(ui->dateinfopage_img_3, 0,0);
lv_img_set_angle(ui->dateinfopage_img_3, 0);
lv_obj_set_pos(ui->dateinfopage_img_3, 422, 17);
lv_obj_set_size(ui->dateinfopage_img_3, 14, 22);
//Write style for dateinfopage_img_3, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_img_opa(ui->dateinfopage_img_3, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes dateinfopage_timeclabel
ui->dateinfopage_timeclabel = lv_label_create(ui->dateinfopage_timecont);
// lv_label_set_text(ui->dateinfopage_timeclabel, "Time");
lv_label_set_text(ui->dateinfopage_timeclabel, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockTime]);
lv_label_set_long_mode(ui->dateinfopage_timeclabel, LV_LABEL_LONG_WRAP);
lv_obj_set_pos(ui->dateinfopage_timeclabel, 21, 0);
lv_obj_set_size(ui->dateinfopage_timeclabel, 50, 24);
//Write style for dateinfopage_timeclabel, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->dateinfopage_timeclabel, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->dateinfopage_timeclabel, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->dateinfopage_timeclabel, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_letter_space(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_line_space(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->dateinfopage_timeclabel, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->dateinfopage_timeclabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes dateinfopage_timetxtlabel
ui->dateinfopage_timetxtlabel = lv_label_create(ui->dateinfopage_timecont);
//lv_label_set_text(ui->dateinfopage_timetxtlabel, "09:48");
lv_label_set_text_fmt(ui->dateinfopage_timetxtlabel,"%02d:%02d",timeinfo.tm_hour,timeinfo.tm_min);
lv_label_set_long_mode(ui->dateinfopage_timetxtlabel, LV_LABEL_LONG_WRAP);
lv_obj_set_pos(ui->dateinfopage_timetxtlabel, 21, 24);
lv_obj_set_size(ui->dateinfopage_timetxtlabel, 60, 24);
//Write style for dateinfopage_timetxtlabel, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->dateinfopage_timetxtlabel, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->dateinfopage_timetxtlabel, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->dateinfopage_timetxtlabel, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_letter_space(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_line_space(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->dateinfopage_timetxtlabel, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->dateinfopage_timetxtlabel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes dateinfopage_timebtn
ui->dateinfopage_timebtn = lv_btn_create(ui->dateinfopage_timecont);
ui->dateinfopage_timebtn_label = lv_label_create(ui->dateinfopage_timebtn);
lv_label_set_text(ui->dateinfopage_timebtn_label, "");
lv_label_set_long_mode(ui->dateinfopage_timebtn_label, LV_LABEL_LONG_WRAP);
lv_obj_align(ui->dateinfopage_timebtn_label, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_pad_all(ui->dateinfopage_timebtn, 0, LV_STATE_DEFAULT);
lv_obj_set_width(ui->dateinfopage_timebtn_label, LV_PCT(100));
lv_obj_set_pos(ui->dateinfopage_timebtn, 0, 0);
lv_obj_set_size(ui->dateinfopage_timebtn, 443, 50);
//Write style for dateinfopage_timebtn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->dateinfopage_timebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->dateinfopage_timebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->dateinfopage_timebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->dateinfopage_timebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->dateinfopage_timebtn, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->dateinfopage_timebtn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->dateinfopage_timebtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->dateinfopage_timebtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style for dateinfopage_timebtn, Part: LV_PART_MAIN, State: LV_STATE_DISABLED.
lv_obj_set_style_bg_opa(ui->dateinfopage_timebtn, 204, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_bg_color(ui->dateinfopage_timebtn, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_bg_grad_dir(ui->dateinfopage_timebtn, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_bg_grad_color(ui->dateinfopage_timebtn, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_bg_main_stop(ui->dateinfopage_timebtn, 0, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_bg_grad_stop(ui->dateinfopage_timebtn, 255, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_border_width(ui->dateinfopage_timebtn, 0, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_radius(ui->dateinfopage_timebtn, 10, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_shadow_width(ui->dateinfopage_timebtn, 0, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_text_color(ui->dateinfopage_timebtn, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_text_font(ui->dateinfopage_timebtn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DISABLED);
lv_obj_set_style_text_opa(ui->dateinfopage_timebtn, 255, LV_PART_MAIN|LV_STATE_DISABLED);
//The custom code of dateinfopage.
if(GET_nvs_Sys_Info_autoupdatetime())//自动更新时间要把按钮禁用掉
{
//lv_obj_add_state(ui->dateinfopage_timebtn, LV_STATE_DISABLED);//off
//日期按键禁止按下
lv_obj_add_state(guider_ui.dateinfopage_datebtn, LV_STATE_DISABLED);//off
//时间禁止允许按下
lv_obj_add_state(guider_ui.dateinfopage_timebtn, LV_STATE_DISABLED);//off
}
else//手动更新时间 允许按钮操作
{
//lv_obj_add_state(ui->dateinfopage_timebtn, LV_STATE_DEFAULT);//on
//日期按键允许按下
lv_obj_clear_state(ui->dateinfopage_datebtn, LV_STATE_DISABLED);//on
//时间按键允许按下
lv_obj_clear_state(ui->dateinfopage_timebtn, LV_STATE_DISABLED);//on
}
//Update current screen layout.
lv_obj_update_layout(ui->dateinfopage);
//Init events for screen.
events_init_dateinfopage(ui);
}

View File

@@ -0,0 +1,654 @@
/*
* Copyright 2025 NXP
* NXP Confidential and Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include "lvgl.h"
#include "gui_guider.h"
#include "events_init.h"
#include "widgets_init.h"
#include "custom.h"
//显示最新的时间和时区
void setup_scr_datesetpage(lv_ui *ui)
{
time_t now;
struct tm timeinfo;
time(&now);
localtime_r(&now, &timeinfo);
LOG_I("timezone utc:%d",tz_get());
LOG_I("time==%d:%d:%d:%d:%02d:%02d:%02d:%02d:%02d",
timeinfo.tm_isdst, //是否为夏时制
timeinfo.tm_yday, //一年过去的天数
timeinfo.tm_wday, //星期1对应星期一
timeinfo.tm_year+1900, //年距离1900年的差值默认是70
timeinfo.tm_mon+1, //日期从0开始 0~11
timeinfo.tm_mday, //日期从1开始
timeinfo.tm_hour, //小时
timeinfo.tm_min, //分钟
timeinfo.tm_sec); //秒钟
//Write codes datesetpage
ui->datesetpage = lv_obj_create(NULL);
lv_obj_set_size(ui->datesetpage, 480, 480);
lv_obj_set_scrollbar_mode(ui->datesetpage, LV_SCROLLBAR_MODE_OFF);
//Write style for datesetpage, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->datesetpage, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->datesetpage, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->datesetpage, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes datesetpage_returnbg
ui->datesetpage_returnbg = lv_img_create(ui->datesetpage);
lv_obj_add_flag(ui->datesetpage_returnbg, LV_OBJ_FLAG_CLICKABLE);
lv_img_set_src(ui->datesetpage_returnbg, LVGL_PATH(returnbg.png));
lv_img_set_pivot(ui->datesetpage_returnbg, 50,50);
lv_img_set_angle(ui->datesetpage_returnbg, 0);
lv_obj_set_pos(ui->datesetpage_returnbg, 23, 27);
lv_obj_set_size(ui->datesetpage_returnbg, 14, 26);
//Write style for datesetpage_returnbg, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_img_opa(ui->datesetpage_returnbg, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes datesetpage_retrunbtn
ui->datesetpage_retrunbtn = lv_btn_create(ui->datesetpage);
ui->datesetpage_retrunbtn_label = lv_label_create(ui->datesetpage_retrunbtn);
lv_label_set_text(ui->datesetpage_retrunbtn_label, "");
lv_label_set_long_mode(ui->datesetpage_retrunbtn_label, LV_LABEL_LONG_WRAP);
lv_obj_align(ui->datesetpage_retrunbtn_label, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_pad_all(ui->datesetpage_retrunbtn, 0, LV_STATE_DEFAULT);
lv_obj_set_width(ui->datesetpage_retrunbtn_label, LV_PCT(100));
lv_obj_set_pos(ui->datesetpage_retrunbtn, 7, 10);
lv_obj_set_size(ui->datesetpage_retrunbtn, 60, 60);
//Write style for datesetpage_retrunbtn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->datesetpage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->datesetpage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->datesetpage_retrunbtn, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->datesetpage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->datesetpage_retrunbtn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->datesetpage_retrunbtn, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->datesetpage_retrunbtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->datesetpage_retrunbtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes datesetpage_label_1
ui->datesetpage_label_1 = lv_label_create(ui->datesetpage);
//lv_label_set_text(ui->datesetpage_label_1, "Time Zone");
lv_label_set_text(ui->datesetpage_label_1, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockZone]);
lv_label_set_long_mode(ui->datesetpage_label_1, LV_LABEL_LONG_WRAP);
lv_obj_set_pos(ui->datesetpage_label_1, 44, 82);
lv_obj_set_size(ui->datesetpage_label_1, 180, 20);
//Write style for datesetpage_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->datesetpage_label_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->datesetpage_label_1, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->datesetpage_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_letter_space(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_line_space(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->datesetpage_label_1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->datesetpage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes datesetpage_zoneddlist
ui->datesetpage_zoneddlist = lv_dropdown_create(ui->datesetpage);
lv_dropdown_set_options(ui->datesetpage_zoneddlist, "UTC-12\nUTC-11\nUTC-10\nUTC-09\nUTC-08\nUTC-07\nUTC-06\nUTC-05\nUTC-04\nUTC-03\nUTC-02\nUTC-01\nUTC+00\nUTC+01\nUTC+02\nUTC+03\nUTC+04\nUTC+05\nUTC+06\nUTC+07\nUTC+08\nUTC+09\nUTC+10\nUTC+11\nUTC+12");
lv_obj_set_pos(ui->datesetpage_zoneddlist, 39, 113);
lv_obj_set_size(ui->datesetpage_zoneddlist, 403, 35);
//0--UTC-12 ....12---UTC+0...... 关系:+12
lv_dropdown_set_selected(ui->datesetpage_zoneddlist,tz_get()+12);//-12~+12----->0~24
//Write style for datesetpage_zoneddlist, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_text_color(ui->datesetpage_zoneddlist, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->datesetpage_zoneddlist, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->datesetpage_zoneddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->datesetpage_zoneddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->datesetpage_zoneddlist, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->datesetpage_zoneddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->datesetpage_zoneddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->datesetpage_zoneddlist, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->datesetpage_zoneddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->datesetpage_zoneddlist, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->datesetpage_zoneddlist, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->datesetpage_zoneddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style state: LV_STATE_CHECKED for &style_datesetpage_zoneddlist_extra_list_selected_checked
static lv_style_t style_datesetpage_zoneddlist_extra_list_selected_checked;
ui_init_style(&style_datesetpage_zoneddlist_extra_list_selected_checked);
lv_style_set_border_width(&style_datesetpage_zoneddlist_extra_list_selected_checked, 1);
lv_style_set_border_opa(&style_datesetpage_zoneddlist_extra_list_selected_checked, 255);
lv_style_set_border_color(&style_datesetpage_zoneddlist_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
lv_style_set_border_side(&style_datesetpage_zoneddlist_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
lv_style_set_radius(&style_datesetpage_zoneddlist_extra_list_selected_checked, 3);
lv_style_set_bg_opa(&style_datesetpage_zoneddlist_extra_list_selected_checked, 255);
lv_style_set_bg_color(&style_datesetpage_zoneddlist_extra_list_selected_checked, lv_color_hex(0x00a1b5));
lv_style_set_bg_grad_dir(&style_datesetpage_zoneddlist_extra_list_selected_checked, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_zoneddlist), &style_datesetpage_zoneddlist_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_zoneddlist_extra_list_main_default
static lv_style_t style_datesetpage_zoneddlist_extra_list_main_default;
ui_init_style(&style_datesetpage_zoneddlist_extra_list_main_default);
lv_style_set_max_height(&style_datesetpage_zoneddlist_extra_list_main_default, 320);
lv_style_set_text_color(&style_datesetpage_zoneddlist_extra_list_main_default, lv_color_hex(0x0D3055));
lv_style_set_text_font(&style_datesetpage_zoneddlist_extra_list_main_default, &lv_font_albbhptR_20);
lv_style_set_text_opa(&style_datesetpage_zoneddlist_extra_list_main_default, 255);
lv_style_set_border_width(&style_datesetpage_zoneddlist_extra_list_main_default, 1);
lv_style_set_border_opa(&style_datesetpage_zoneddlist_extra_list_main_default, 255);
lv_style_set_border_color(&style_datesetpage_zoneddlist_extra_list_main_default, lv_color_hex(0xe1e6ee));
lv_style_set_border_side(&style_datesetpage_zoneddlist_extra_list_main_default, LV_BORDER_SIDE_FULL);
lv_style_set_radius(&style_datesetpage_zoneddlist_extra_list_main_default, 3);
lv_style_set_bg_opa(&style_datesetpage_zoneddlist_extra_list_main_default, 255);
lv_style_set_bg_color(&style_datesetpage_zoneddlist_extra_list_main_default, lv_color_hex(0xffffff));
lv_style_set_bg_grad_dir(&style_datesetpage_zoneddlist_extra_list_main_default, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_zoneddlist), &style_datesetpage_zoneddlist_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_zoneddlist_extra_list_scrollbar_default
static lv_style_t style_datesetpage_zoneddlist_extra_list_scrollbar_default;
ui_init_style(&style_datesetpage_zoneddlist_extra_list_scrollbar_default);
lv_style_set_radius(&style_datesetpage_zoneddlist_extra_list_scrollbar_default, 3);
lv_style_set_bg_opa(&style_datesetpage_zoneddlist_extra_list_scrollbar_default, 255);
lv_style_set_bg_color(&style_datesetpage_zoneddlist_extra_list_scrollbar_default, lv_color_hex(0x00ff00));
lv_style_set_bg_grad_dir(&style_datesetpage_zoneddlist_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_zoneddlist), &style_datesetpage_zoneddlist_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
//Write codes datesetpage_label_2
ui->datesetpage_label_2 = lv_label_create(ui->datesetpage);
//lv_label_set_text(ui->datesetpage_label_2, "Date");
lv_label_set_text(ui->datesetpage_label_2, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockDate]);
lv_label_set_long_mode(ui->datesetpage_label_2, LV_LABEL_LONG_WRAP);
lv_obj_set_pos(ui->datesetpage_label_2, 44, 179);
lv_obj_set_size(ui->datesetpage_label_2, 180, 20);
//Write style for datesetpage_label_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->datesetpage_label_2, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->datesetpage_label_2, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->datesetpage_label_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_letter_space(ui->datesetpage_label_2, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_line_space(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->datesetpage_label_2, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->datesetpage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes datesetpage_yearddlist
ui->datesetpage_yearddlist = lv_dropdown_create(ui->datesetpage);
lv_dropdown_set_options(ui->datesetpage_yearddlist, "2024\n2025\n2026\n2027\n2028\n2029\n2030\n2031\n2032\n2033\n2034\n2035\n2036\n2037\n2038\n2039\n2040\n2041\n2042\n2043\n2044\n2045\n2046\n2047\n2048\n2049\n2050\n2051\n2052\n2053\n2054\n2055\n2056\n2057\n2058\n2059\n2060\n2061\n2062\n2063\n2064\n2065\n2066\n2067\n2068\n2069\n2070\n2071\n2072\n2073\n2074\n2075\n2076\n2077\n2078\n2079\n2080\n2081\n2082\n2083\n2084\n2085\n2086\n2087\n2088\n2089\n2090\n2091\n2092\n2093\n2094\n2095\n2096\n2097\n2098\n2099");
lv_obj_set_pos(ui->datesetpage_yearddlist, 39, 210);
lv_obj_set_size(ui->datesetpage_yearddlist, 120, 35);
//(timeinfo.tm_year+1900)-2004
lv_dropdown_set_selected(ui->datesetpage_yearddlist,(timeinfo.tm_year+1900)-2024);
//Write style for datesetpage_yearddlist, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_text_color(ui->datesetpage_yearddlist, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->datesetpage_yearddlist, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->datesetpage_yearddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->datesetpage_yearddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->datesetpage_yearddlist, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->datesetpage_yearddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->datesetpage_yearddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->datesetpage_yearddlist, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->datesetpage_yearddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->datesetpage_yearddlist, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->datesetpage_yearddlist, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->datesetpage_yearddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style state: LV_STATE_CHECKED for &style_datesetpage_yearddlist_extra_list_selected_checked
static lv_style_t style_datesetpage_yearddlist_extra_list_selected_checked;
ui_init_style(&style_datesetpage_yearddlist_extra_list_selected_checked);
lv_style_set_border_width(&style_datesetpage_yearddlist_extra_list_selected_checked, 1);
lv_style_set_border_opa(&style_datesetpage_yearddlist_extra_list_selected_checked, 255);
lv_style_set_border_color(&style_datesetpage_yearddlist_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
lv_style_set_border_side(&style_datesetpage_yearddlist_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
lv_style_set_radius(&style_datesetpage_yearddlist_extra_list_selected_checked, 3);
lv_style_set_bg_opa(&style_datesetpage_yearddlist_extra_list_selected_checked, 255);
lv_style_set_bg_color(&style_datesetpage_yearddlist_extra_list_selected_checked, lv_color_hex(0x00a1b5));
lv_style_set_bg_grad_dir(&style_datesetpage_yearddlist_extra_list_selected_checked, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_yearddlist), &style_datesetpage_yearddlist_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_yearddlist_extra_list_main_default
static lv_style_t style_datesetpage_yearddlist_extra_list_main_default;
ui_init_style(&style_datesetpage_yearddlist_extra_list_main_default);
lv_style_set_max_height(&style_datesetpage_yearddlist_extra_list_main_default, 150);
lv_style_set_text_color(&style_datesetpage_yearddlist_extra_list_main_default, lv_color_hex(0x0D3055));
lv_style_set_text_font(&style_datesetpage_yearddlist_extra_list_main_default, &lv_font_albbhptR_20);
lv_style_set_text_opa(&style_datesetpage_yearddlist_extra_list_main_default, 255);
lv_style_set_border_width(&style_datesetpage_yearddlist_extra_list_main_default, 1);
lv_style_set_border_opa(&style_datesetpage_yearddlist_extra_list_main_default, 255);
lv_style_set_border_color(&style_datesetpage_yearddlist_extra_list_main_default, lv_color_hex(0xe1e6ee));
lv_style_set_border_side(&style_datesetpage_yearddlist_extra_list_main_default, LV_BORDER_SIDE_FULL);
lv_style_set_radius(&style_datesetpage_yearddlist_extra_list_main_default, 3);
lv_style_set_bg_opa(&style_datesetpage_yearddlist_extra_list_main_default, 255);
lv_style_set_bg_color(&style_datesetpage_yearddlist_extra_list_main_default, lv_color_hex(0xffffff));
lv_style_set_bg_grad_dir(&style_datesetpage_yearddlist_extra_list_main_default, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_yearddlist), &style_datesetpage_yearddlist_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_yearddlist_extra_list_scrollbar_default
static lv_style_t style_datesetpage_yearddlist_extra_list_scrollbar_default;
ui_init_style(&style_datesetpage_yearddlist_extra_list_scrollbar_default);
lv_style_set_radius(&style_datesetpage_yearddlist_extra_list_scrollbar_default, 3);
lv_style_set_bg_opa(&style_datesetpage_yearddlist_extra_list_scrollbar_default, 255);
lv_style_set_bg_color(&style_datesetpage_yearddlist_extra_list_scrollbar_default, lv_color_hex(0x00ff00));
lv_style_set_bg_grad_dir(&style_datesetpage_yearddlist_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_yearddlist), &style_datesetpage_yearddlist_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
//Write codes datesetpage_moonddlist
ui->datesetpage_moonddlist = lv_dropdown_create(ui->datesetpage);
lv_dropdown_set_options(ui->datesetpage_moonddlist, "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12");
lv_obj_set_pos(ui->datesetpage_moonddlist, 200, 210);
lv_obj_set_size(ui->datesetpage_moonddlist, 80, 35);
//timeinfo.tm_mon //日期从0开始 0~11 刚好对应
lv_dropdown_set_selected(ui->datesetpage_moonddlist,timeinfo.tm_mon);
//Write style for datesetpage_moonddlist, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_text_color(ui->datesetpage_moonddlist, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->datesetpage_moonddlist, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->datesetpage_moonddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->datesetpage_moonddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->datesetpage_moonddlist, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->datesetpage_moonddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->datesetpage_moonddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->datesetpage_moonddlist, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->datesetpage_moonddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->datesetpage_moonddlist, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->datesetpage_moonddlist, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->datesetpage_moonddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style state: LV_STATE_CHECKED for &style_datesetpage_moonddlist_extra_list_selected_checked
static lv_style_t style_datesetpage_moonddlist_extra_list_selected_checked;
ui_init_style(&style_datesetpage_moonddlist_extra_list_selected_checked);
lv_style_set_border_width(&style_datesetpage_moonddlist_extra_list_selected_checked, 1);
lv_style_set_border_opa(&style_datesetpage_moonddlist_extra_list_selected_checked, 255);
lv_style_set_border_color(&style_datesetpage_moonddlist_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
lv_style_set_border_side(&style_datesetpage_moonddlist_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
lv_style_set_radius(&style_datesetpage_moonddlist_extra_list_selected_checked, 3);
lv_style_set_bg_opa(&style_datesetpage_moonddlist_extra_list_selected_checked, 255);
lv_style_set_bg_color(&style_datesetpage_moonddlist_extra_list_selected_checked, lv_color_hex(0x00a1b5));
lv_style_set_bg_grad_dir(&style_datesetpage_moonddlist_extra_list_selected_checked, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_moonddlist), &style_datesetpage_moonddlist_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_moonddlist_extra_list_main_default
static lv_style_t style_datesetpage_moonddlist_extra_list_main_default;
ui_init_style(&style_datesetpage_moonddlist_extra_list_main_default);
lv_style_set_max_height(&style_datesetpage_moonddlist_extra_list_main_default, 150);
lv_style_set_text_color(&style_datesetpage_moonddlist_extra_list_main_default, lv_color_hex(0x0D3055));
lv_style_set_text_font(&style_datesetpage_moonddlist_extra_list_main_default, &lv_font_albbhptR_20);
lv_style_set_text_opa(&style_datesetpage_moonddlist_extra_list_main_default, 255);
lv_style_set_border_width(&style_datesetpage_moonddlist_extra_list_main_default, 1);
lv_style_set_border_opa(&style_datesetpage_moonddlist_extra_list_main_default, 255);
lv_style_set_border_color(&style_datesetpage_moonddlist_extra_list_main_default, lv_color_hex(0xe1e6ee));
lv_style_set_border_side(&style_datesetpage_moonddlist_extra_list_main_default, LV_BORDER_SIDE_FULL);
lv_style_set_radius(&style_datesetpage_moonddlist_extra_list_main_default, 3);
lv_style_set_bg_opa(&style_datesetpage_moonddlist_extra_list_main_default, 255);
lv_style_set_bg_color(&style_datesetpage_moonddlist_extra_list_main_default, lv_color_hex(0xffffff));
lv_style_set_bg_grad_dir(&style_datesetpage_moonddlist_extra_list_main_default, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_moonddlist), &style_datesetpage_moonddlist_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_moonddlist_extra_list_scrollbar_default
static lv_style_t style_datesetpage_moonddlist_extra_list_scrollbar_default;
ui_init_style(&style_datesetpage_moonddlist_extra_list_scrollbar_default);
lv_style_set_radius(&style_datesetpage_moonddlist_extra_list_scrollbar_default, 3);
lv_style_set_bg_opa(&style_datesetpage_moonddlist_extra_list_scrollbar_default, 255);
lv_style_set_bg_color(&style_datesetpage_moonddlist_extra_list_scrollbar_default, lv_color_hex(0x00ff00));
lv_style_set_bg_grad_dir(&style_datesetpage_moonddlist_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_moonddlist), &style_datesetpage_moonddlist_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
//Write codes datesetpage_sunddlist
ui->datesetpage_sunddlist = lv_dropdown_create(ui->datesetpage);
//统一用31天 保存的时候弹窗警告
//依据月份定
// if(
// ((timeinfo.tm_mon+1)==1)
// ||((timeinfo.tm_mon+1)==3)
// ||((timeinfo.tm_mon+1)==5)
// ||((timeinfo.tm_mon+1)==7)
// ||((timeinfo.tm_mon+1)==8)
// ||((timeinfo.tm_mon+1)==10)
// ||((timeinfo.tm_mon+1)==12)
// )
// {
lv_dropdown_set_options(ui->datesetpage_sunddlist, "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31");// 1 3 5 7 8 10 12
// }
// else if(
// ((timeinfo.tm_mon+1)==4)
// ||((timeinfo.tm_mon+1)==6)
// ||((timeinfo.tm_mon+1)==9)
// ||((timeinfo.tm_mon+1)==11)
// )
// {
// lv_dropdown_set_options(ui->datesetpage_sunddlist, "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30");//4 6 9 11
// }
// else//2月
// {
// lv_dropdown_set_options(ui->datesetpage_sunddlist, "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28");//2
// }
lv_obj_set_pos(ui->datesetpage_sunddlist, 310, 210);
lv_obj_set_size(ui->datesetpage_sunddlist, 80, 35);
LOG_I("tm_mday:%d",timeinfo.tm_mday-1);
//timeinfo.tm_mday//日期从1开始 ;所以-1转换
lv_dropdown_set_selected(ui->datesetpage_sunddlist,timeinfo.tm_mday-1);
//Write style for datesetpage_sunddlist, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_text_color(ui->datesetpage_sunddlist, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->datesetpage_sunddlist, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->datesetpage_sunddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->datesetpage_sunddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->datesetpage_sunddlist, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->datesetpage_sunddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->datesetpage_sunddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->datesetpage_sunddlist, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->datesetpage_sunddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->datesetpage_sunddlist, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->datesetpage_sunddlist, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->datesetpage_sunddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style state: LV_STATE_CHECKED for &style_datesetpage_sunddlist_extra_list_selected_checked
static lv_style_t style_datesetpage_sunddlist_extra_list_selected_checked;
ui_init_style(&style_datesetpage_sunddlist_extra_list_selected_checked);
lv_style_set_border_width(&style_datesetpage_sunddlist_extra_list_selected_checked, 1);
lv_style_set_border_opa(&style_datesetpage_sunddlist_extra_list_selected_checked, 255);
lv_style_set_border_color(&style_datesetpage_sunddlist_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
lv_style_set_border_side(&style_datesetpage_sunddlist_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
lv_style_set_radius(&style_datesetpage_sunddlist_extra_list_selected_checked, 3);
lv_style_set_bg_opa(&style_datesetpage_sunddlist_extra_list_selected_checked, 255);
lv_style_set_bg_color(&style_datesetpage_sunddlist_extra_list_selected_checked, lv_color_hex(0x00a1b5));
lv_style_set_bg_grad_dir(&style_datesetpage_sunddlist_extra_list_selected_checked, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_sunddlist), &style_datesetpage_sunddlist_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_sunddlist_extra_list_main_default
static lv_style_t style_datesetpage_sunddlist_extra_list_main_default;
ui_init_style(&style_datesetpage_sunddlist_extra_list_main_default);
lv_style_set_max_height(&style_datesetpage_sunddlist_extra_list_main_default, 150);
lv_style_set_text_color(&style_datesetpage_sunddlist_extra_list_main_default, lv_color_hex(0x0D3055));
lv_style_set_text_font(&style_datesetpage_sunddlist_extra_list_main_default, &lv_font_albbhptR_20);
lv_style_set_text_opa(&style_datesetpage_sunddlist_extra_list_main_default, 255);
lv_style_set_border_width(&style_datesetpage_sunddlist_extra_list_main_default, 1);
lv_style_set_border_opa(&style_datesetpage_sunddlist_extra_list_main_default, 255);
lv_style_set_border_color(&style_datesetpage_sunddlist_extra_list_main_default, lv_color_hex(0xe1e6ee));
lv_style_set_border_side(&style_datesetpage_sunddlist_extra_list_main_default, LV_BORDER_SIDE_FULL);
lv_style_set_radius(&style_datesetpage_sunddlist_extra_list_main_default, 3);
lv_style_set_bg_opa(&style_datesetpage_sunddlist_extra_list_main_default, 255);
lv_style_set_bg_color(&style_datesetpage_sunddlist_extra_list_main_default, lv_color_hex(0xffffff));
lv_style_set_bg_grad_dir(&style_datesetpage_sunddlist_extra_list_main_default, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_sunddlist), &style_datesetpage_sunddlist_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_sunddlist_extra_list_scrollbar_default
static lv_style_t style_datesetpage_sunddlist_extra_list_scrollbar_default;
ui_init_style(&style_datesetpage_sunddlist_extra_list_scrollbar_default);
lv_style_set_radius(&style_datesetpage_sunddlist_extra_list_scrollbar_default, 3);
lv_style_set_bg_opa(&style_datesetpage_sunddlist_extra_list_scrollbar_default, 255);
lv_style_set_bg_color(&style_datesetpage_sunddlist_extra_list_scrollbar_default, lv_color_hex(0x00ff00));
lv_style_set_bg_grad_dir(&style_datesetpage_sunddlist_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_sunddlist), &style_datesetpage_sunddlist_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
//Write codes datesetpage_label_3
ui->datesetpage_label_3 = lv_label_create(ui->datesetpage);
//lv_label_set_text(ui->datesetpage_label_3, "Time ");
lv_label_set_text(ui->datesetpage_label_3, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockTime]);
lv_label_set_long_mode(ui->datesetpage_label_3, LV_LABEL_LONG_WRAP);
lv_obj_set_pos(ui->datesetpage_label_3, 44, 280);
lv_obj_set_size(ui->datesetpage_label_3, 180, 20);
//Write style for datesetpage_label_3, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->datesetpage_label_3, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->datesetpage_label_3, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->datesetpage_label_3, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_letter_space(ui->datesetpage_label_3, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_line_space(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->datesetpage_label_3, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->datesetpage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes datesetpage_hourddlist
ui->datesetpage_hourddlist = lv_dropdown_create(ui->datesetpage);
lv_dropdown_set_options(ui->datesetpage_hourddlist, "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23");
lv_obj_set_pos(ui->datesetpage_hourddlist, 39, 310);
lv_obj_set_size(ui->datesetpage_hourddlist, 120, 35);
//timeinfo.tm_hour 0~23
lv_dropdown_set_selected(ui->datesetpage_hourddlist,timeinfo.tm_hour);
//Write style for datesetpage_hourddlist, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_text_color(ui->datesetpage_hourddlist, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->datesetpage_hourddlist, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->datesetpage_hourddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->datesetpage_hourddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->datesetpage_hourddlist, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->datesetpage_hourddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->datesetpage_hourddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->datesetpage_hourddlist, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->datesetpage_hourddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->datesetpage_hourddlist, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->datesetpage_hourddlist, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->datesetpage_hourddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style state: LV_STATE_CHECKED for &style_datesetpage_hourddlist_extra_list_selected_checked
static lv_style_t style_datesetpage_hourddlist_extra_list_selected_checked;
ui_init_style(&style_datesetpage_hourddlist_extra_list_selected_checked);
lv_style_set_border_width(&style_datesetpage_hourddlist_extra_list_selected_checked, 1);
lv_style_set_border_opa(&style_datesetpage_hourddlist_extra_list_selected_checked, 255);
lv_style_set_border_color(&style_datesetpage_hourddlist_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
lv_style_set_border_side(&style_datesetpage_hourddlist_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
lv_style_set_radius(&style_datesetpage_hourddlist_extra_list_selected_checked, 3);
lv_style_set_bg_opa(&style_datesetpage_hourddlist_extra_list_selected_checked, 255);
lv_style_set_bg_color(&style_datesetpage_hourddlist_extra_list_selected_checked, lv_color_hex(0x00a1b5));
lv_style_set_bg_grad_dir(&style_datesetpage_hourddlist_extra_list_selected_checked, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_hourddlist), &style_datesetpage_hourddlist_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_hourddlist_extra_list_main_default
static lv_style_t style_datesetpage_hourddlist_extra_list_main_default;
ui_init_style(&style_datesetpage_hourddlist_extra_list_main_default);
lv_style_set_max_height(&style_datesetpage_hourddlist_extra_list_main_default, 120);
lv_style_set_text_color(&style_datesetpage_hourddlist_extra_list_main_default, lv_color_hex(0x0D3055));
lv_style_set_text_font(&style_datesetpage_hourddlist_extra_list_main_default, &lv_font_albbhptR_20);
lv_style_set_text_opa(&style_datesetpage_hourddlist_extra_list_main_default, 255);
lv_style_set_border_width(&style_datesetpage_hourddlist_extra_list_main_default, 1);
lv_style_set_border_opa(&style_datesetpage_hourddlist_extra_list_main_default, 255);
lv_style_set_border_color(&style_datesetpage_hourddlist_extra_list_main_default, lv_color_hex(0xe1e6ee));
lv_style_set_border_side(&style_datesetpage_hourddlist_extra_list_main_default, LV_BORDER_SIDE_FULL);
lv_style_set_radius(&style_datesetpage_hourddlist_extra_list_main_default, 3);
lv_style_set_bg_opa(&style_datesetpage_hourddlist_extra_list_main_default, 255);
lv_style_set_bg_color(&style_datesetpage_hourddlist_extra_list_main_default, lv_color_hex(0xffffff));
lv_style_set_bg_grad_dir(&style_datesetpage_hourddlist_extra_list_main_default, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_hourddlist), &style_datesetpage_hourddlist_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_hourddlist_extra_list_scrollbar_default
static lv_style_t style_datesetpage_hourddlist_extra_list_scrollbar_default;
ui_init_style(&style_datesetpage_hourddlist_extra_list_scrollbar_default);
lv_style_set_radius(&style_datesetpage_hourddlist_extra_list_scrollbar_default, 3);
lv_style_set_bg_opa(&style_datesetpage_hourddlist_extra_list_scrollbar_default, 255);
lv_style_set_bg_color(&style_datesetpage_hourddlist_extra_list_scrollbar_default, lv_color_hex(0x00ff00));
lv_style_set_bg_grad_dir(&style_datesetpage_hourddlist_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_hourddlist), &style_datesetpage_hourddlist_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
//Write codes datesetpage_minuteddlist
ui->datesetpage_minuteddlist = lv_dropdown_create(ui->datesetpage);
lv_dropdown_set_options(ui->datesetpage_minuteddlist, "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59");
lv_obj_set_pos(ui->datesetpage_minuteddlist, 200, 310);
lv_obj_set_size(ui->datesetpage_minuteddlist, 120, 35);
//timeinfo.tm_min 0~59
lv_dropdown_set_selected(ui->datesetpage_minuteddlist,timeinfo.tm_min);
//Write style for datesetpage_minuteddlist, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_text_color(ui->datesetpage_minuteddlist, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->datesetpage_minuteddlist, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->datesetpage_minuteddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->datesetpage_minuteddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->datesetpage_minuteddlist, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->datesetpage_minuteddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->datesetpage_minuteddlist, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->datesetpage_minuteddlist, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->datesetpage_minuteddlist, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->datesetpage_minuteddlist, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->datesetpage_minuteddlist, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->datesetpage_minuteddlist, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style state: LV_STATE_CHECKED for &style_datesetpage_minuteddlist_extra_list_selected_checked
static lv_style_t style_datesetpage_minuteddlist_extra_list_selected_checked;
ui_init_style(&style_datesetpage_minuteddlist_extra_list_selected_checked);
lv_style_set_border_width(&style_datesetpage_minuteddlist_extra_list_selected_checked, 1);
lv_style_set_border_opa(&style_datesetpage_minuteddlist_extra_list_selected_checked, 255);
lv_style_set_border_color(&style_datesetpage_minuteddlist_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
lv_style_set_border_side(&style_datesetpage_minuteddlist_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
lv_style_set_radius(&style_datesetpage_minuteddlist_extra_list_selected_checked, 3);
lv_style_set_bg_opa(&style_datesetpage_minuteddlist_extra_list_selected_checked, 255);
lv_style_set_bg_color(&style_datesetpage_minuteddlist_extra_list_selected_checked, lv_color_hex(0x00a1b5));
lv_style_set_bg_grad_dir(&style_datesetpage_minuteddlist_extra_list_selected_checked, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_minuteddlist), &style_datesetpage_minuteddlist_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_minuteddlist_extra_list_main_default
static lv_style_t style_datesetpage_minuteddlist_extra_list_main_default;
ui_init_style(&style_datesetpage_minuteddlist_extra_list_main_default);
lv_style_set_max_height(&style_datesetpage_minuteddlist_extra_list_main_default, 120);
lv_style_set_text_color(&style_datesetpage_minuteddlist_extra_list_main_default, lv_color_hex(0x0D3055));
lv_style_set_text_font(&style_datesetpage_minuteddlist_extra_list_main_default, &lv_font_albbhptR_20);
lv_style_set_text_opa(&style_datesetpage_minuteddlist_extra_list_main_default, 255);
lv_style_set_border_width(&style_datesetpage_minuteddlist_extra_list_main_default, 1);
lv_style_set_border_opa(&style_datesetpage_minuteddlist_extra_list_main_default, 255);
lv_style_set_border_color(&style_datesetpage_minuteddlist_extra_list_main_default, lv_color_hex(0xe1e6ee));
lv_style_set_border_side(&style_datesetpage_minuteddlist_extra_list_main_default, LV_BORDER_SIDE_FULL);
lv_style_set_radius(&style_datesetpage_minuteddlist_extra_list_main_default, 3);
lv_style_set_bg_opa(&style_datesetpage_minuteddlist_extra_list_main_default, 255);
lv_style_set_bg_color(&style_datesetpage_minuteddlist_extra_list_main_default, lv_color_hex(0xffffff));
lv_style_set_bg_grad_dir(&style_datesetpage_minuteddlist_extra_list_main_default, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_minuteddlist), &style_datesetpage_minuteddlist_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style state: LV_STATE_DEFAULT for &style_datesetpage_minuteddlist_extra_list_scrollbar_default
static lv_style_t style_datesetpage_minuteddlist_extra_list_scrollbar_default;
ui_init_style(&style_datesetpage_minuteddlist_extra_list_scrollbar_default);
lv_style_set_radius(&style_datesetpage_minuteddlist_extra_list_scrollbar_default, 3);
lv_style_set_bg_opa(&style_datesetpage_minuteddlist_extra_list_scrollbar_default, 255);
lv_style_set_bg_color(&style_datesetpage_minuteddlist_extra_list_scrollbar_default, lv_color_hex(0x00ff00));
lv_style_set_bg_grad_dir(&style_datesetpage_minuteddlist_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_dropdown_get_list(ui->datesetpage_minuteddlist), &style_datesetpage_minuteddlist_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
//Write codes datesetpage_changebtn
ui->datesetpage_changebtn = lv_btn_create(ui->datesetpage);
ui->datesetpage_changebtn_label = lv_label_create(ui->datesetpage_changebtn);
//lv_label_set_text(ui->datesetpage_changebtn_label, "更改");
lv_label_set_text(ui->datesetpage_changebtn_label,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockChange]);
lv_label_set_long_mode(ui->datesetpage_changebtn_label, LV_LABEL_LONG_WRAP);
lv_obj_align(ui->datesetpage_changebtn_label, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_pad_all(ui->datesetpage_changebtn, 0, LV_STATE_DEFAULT);
lv_obj_set_width(ui->datesetpage_changebtn_label, LV_PCT(100));
lv_obj_set_pos(ui->datesetpage_changebtn, 84, 402);
lv_obj_set_size(ui->datesetpage_changebtn, 119, 48);
//Write style for datesetpage_changebtn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->datesetpage_changebtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->datesetpage_changebtn, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->datesetpage_changebtn, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->datesetpage_changebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->datesetpage_changebtn, 24, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->datesetpage_changebtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->datesetpage_changebtn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->datesetpage_changebtn, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->datesetpage_changebtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->datesetpage_changebtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style for datesetpage_changebtn, Part: LV_PART_MAIN, State: LV_STATE_PRESSED.
lv_obj_set_style_bg_opa(ui->datesetpage_changebtn, 255, LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_bg_color(ui->datesetpage_changebtn, lv_color_hex(0x1F3051), LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_bg_grad_dir(ui->datesetpage_changebtn, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_border_width(ui->datesetpage_changebtn, 0, LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_radius(ui->datesetpage_changebtn, 24, LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_shadow_width(ui->datesetpage_changebtn, 0, LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_text_color(ui->datesetpage_changebtn, lv_color_hex(0xa8a8a8), LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_text_font(ui->datesetpage_changebtn, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_text_opa(ui->datesetpage_changebtn, 255, LV_PART_MAIN|LV_STATE_PRESSED);
//Write codes datesetpage_cancelbtn
ui->datesetpage_cancelbtn = lv_btn_create(ui->datesetpage);
ui->datesetpage_cancelbtn_label = lv_label_create(ui->datesetpage_cancelbtn);
//lv_label_set_text(ui->datesetpage_cancelbtn_label, "取消");
lv_label_set_text(ui->datesetpage_cancelbtn_label,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClockcancel]);
lv_label_set_long_mode(ui->datesetpage_cancelbtn_label, LV_LABEL_LONG_WRAP);
lv_obj_align(ui->datesetpage_cancelbtn_label, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_pad_all(ui->datesetpage_cancelbtn, 0, LV_STATE_DEFAULT);
lv_obj_set_width(ui->datesetpage_cancelbtn_label, LV_PCT(100));
lv_obj_set_pos(ui->datesetpage_cancelbtn, 289, 402);
lv_obj_set_size(ui->datesetpage_cancelbtn, 119, 48);
//Write style for datesetpage_cancelbtn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->datesetpage_cancelbtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->datesetpage_cancelbtn, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->datesetpage_cancelbtn, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->datesetpage_cancelbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->datesetpage_cancelbtn, 24, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->datesetpage_cancelbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->datesetpage_cancelbtn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->datesetpage_cancelbtn, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->datesetpage_cancelbtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->datesetpage_cancelbtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style for datesetpage_cancelbtn, Part: LV_PART_MAIN, State: LV_STATE_PRESSED.
lv_obj_set_style_bg_opa(ui->datesetpage_cancelbtn, 255, LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_bg_color(ui->datesetpage_cancelbtn, lv_color_hex(0x1F3051), LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_bg_grad_dir(ui->datesetpage_cancelbtn, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_border_width(ui->datesetpage_cancelbtn, 0, LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_radius(ui->datesetpage_cancelbtn, 24, LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_shadow_width(ui->datesetpage_cancelbtn, 0, LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_text_color(ui->datesetpage_cancelbtn, lv_color_hex(0xa8a8a8), LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_text_font(ui->datesetpage_cancelbtn, &lv_font_albbhptR_20, LV_PART_MAIN|LV_STATE_PRESSED);
lv_obj_set_style_text_opa(ui->datesetpage_cancelbtn, 255, LV_PART_MAIN|LV_STATE_PRESSED);
//The custom code of datesetpage.
//Update current screen layout.
lv_obj_update_layout(ui->datesetpage);
//Init events for screen.
events_init_datesetpage(ui);
}

View File

@@ -976,6 +976,59 @@ void setup_scr_scene(lv_ui *ui)
lv_img_set_src(ui->scene_scenes_page_icon, LVGL_PATH(page_sw1_42x22.png));
}
//The custom code of scene.
//Write codes scene_alarmtimecont
ui->scene_alarmtimecont = lv_obj_create(ui->scene);
lv_obj_set_pos(ui->scene_alarmtimecont, 115, 340);
lv_obj_set_size(ui->scene_alarmtimecont, 250, 36);
lv_obj_set_scrollbar_mode(ui->scene_alarmtimecont, LV_SCROLLBAR_MODE_OFF);
//Write style for scene_alarmtimecont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->scene_alarmtimecont, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->scene_alarmtimecont, 170, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->scene_alarmtimecont, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->scene_alarmtimecont, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes scene_img_13
ui->scene_img_13 = lv_img_create(ui->scene_alarmtimecont);
lv_obj_add_flag(ui->scene_img_13, LV_OBJ_FLAG_CLICKABLE);
lv_img_set_src(ui->scene_img_13, LVGL_PATH(alarmtime.png));
lv_img_set_pivot(ui->scene_img_13, 50,50);
lv_img_set_angle(ui->scene_img_13, 0);
lv_obj_set_pos(ui->scene_img_13, 6, 4);
lv_obj_set_size(ui->scene_img_13, 28, 28);
//Write style for scene_img_13, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_img_opa(ui->scene_img_13, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes scene_label_12
ui->scene_label_12 = lv_label_create(ui->scene_alarmtimecont);
//lv_label_set_text(ui->scene_label_12, "The currt time may be wrong, \nyou need to set the time manually.");
lv_label_set_text(ui->scene_label_12,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_power_date_alarm]);
lv_label_set_long_mode(ui->scene_label_12, LV_LABEL_LONG_WRAP);
lv_obj_set_pos(ui->scene_label_12, 38, 6);
lv_obj_set_size(ui->scene_label_12, 210, 28);
//Write style for scene_label_12, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->scene_label_12, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->scene_label_12, &lv_font_albbhptR_12, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->scene_label_12, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_letter_space(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_line_space(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->scene_label_12, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Update current screen layout.
lv_obj_update_layout(ui->scene);

View File

@@ -15,7 +15,6 @@
#include "custom.h"
void setup_scr_setting(lv_ui *ui)
{
//Write codes setting
@@ -65,18 +64,13 @@ void setup_scr_setting(lv_ui *ui)
//Write codes setting_cont_1
ui->setting_cont_1 = lv_obj_create(ui->setting);
lv_obj_set_pos(ui->setting_cont_1, 15, 76);
lv_obj_set_size(ui->setting_cont_1, 447, 320);
lv_obj_set_size(ui->setting_cont_1, 447, 340);
lv_obj_set_scrollbar_mode(ui->setting_cont_1, LV_SCROLLBAR_MODE_OFF);
//Write style for setting_cont_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->setting_cont_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->setting_cont_1, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_color(ui->setting_cont_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_main_stop(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_stop(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->setting_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
@@ -138,10 +132,10 @@ void setup_scr_setting(lv_ui *ui)
//Write codes setting_mainfolabel_1
ui->setting_mainfolabel_1 = lv_label_create(ui->setting_cont_1);
//lv_label_set_text(ui->setting_mainfolabel_1, "Host");
lv_label_set_text(ui->setting_mainfolabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetHost]);
lv_label_set_text(ui->setting_mainfolabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetHost]);
lv_label_set_long_mode(ui->setting_mainfolabel_1, LV_LABEL_LONG_DOT);
lv_obj_set_pos(ui->setting_mainfolabel_1, 50, 17);
lv_obj_set_size(ui->setting_mainfolabel_1, 150, 24);
lv_obj_set_size(ui->setting_mainfolabel_1, 200, 24);
//Write style for setting_mainfolabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->setting_mainfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
@@ -175,10 +169,10 @@ void setup_scr_setting(lv_ui *ui)
lv_obj_set_style_border_width(ui->setting_mainfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->setting_mainfobtn_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->setting_mainfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_color(ui->setting_mainfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_font(ui->setting_mainfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_opa(ui->setting_mainfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_align(ui->setting_mainfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
//lv_obj_set_style_text_color(ui->setting_mainfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
//lv_obj_set_style_text_font(ui->setting_mainfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
//lv_obj_set_style_text_opa(ui->setting_mainfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
//lv_obj_set_style_text_align(ui->setting_mainfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes setting_dispinfo
ui->setting_dispinfo = lv_label_create(ui->setting_cont_1);
@@ -226,7 +220,7 @@ void setup_scr_setting(lv_ui *ui)
lv_img_set_src(ui->setting_dispinfoimg_2, LVGL_PATH(nextpagebg.png));
lv_img_set_pivot(ui->setting_dispinfoimg_2, 0,0);
lv_img_set_angle(ui->setting_dispinfoimg_2, 0);
lv_obj_set_pos(ui->setting_dispinfoimg_2, 424, 61);
lv_obj_set_pos(ui->setting_dispinfoimg_2, 424, 65);
lv_obj_set_size(ui->setting_dispinfoimg_2, 14, 22);
//Write style for setting_dispinfoimg_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -235,11 +229,10 @@ void setup_scr_setting(lv_ui *ui)
//Write codes setting_dispinfolabel_1
ui->setting_dispinfolabel_1 = lv_label_create(ui->setting_cont_1);
//lv_label_set_text(ui->setting_dispinfolabel_1, "Display");
lv_label_set_text(ui->setting_dispinfolabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetDisplay]);
lv_label_set_text(ui->setting_dispinfolabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetDisplay]);
lv_label_set_long_mode(ui->setting_dispinfolabel_1, LV_LABEL_LONG_DOT);
lv_obj_set_pos(ui->setting_dispinfolabel_1, 50, 65);
lv_obj_set_size(ui->setting_dispinfolabel_1, 150, 24);
lv_obj_set_size(ui->setting_dispinfolabel_1, 200, 24);
//Write style for setting_dispinfolabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->setting_dispinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
@@ -273,16 +266,113 @@ void setup_scr_setting(lv_ui *ui)
lv_obj_set_style_border_width(ui->setting_dispinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->setting_dispinfobtn_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->setting_dispinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_color(ui->setting_dispinfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_font(ui->setting_dispinfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_opa(ui->setting_dispinfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_align(ui->setting_dispinfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
//lv_obj_set_style_text_color(ui->setting_dispinfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
//lv_obj_set_style_text_font(ui->setting_dispinfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
//lv_obj_set_style_text_opa(ui->setting_dispinfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
//lv_obj_set_style_text_align(ui->setting_dispinfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes setting_dateinfo
ui->setting_dateinfo = lv_label_create(ui->setting_cont_1);
lv_label_set_text(ui->setting_dateinfo, "");
lv_label_set_long_mode(ui->setting_dateinfo, LV_LABEL_LONG_DOT);
lv_obj_set_pos(ui->setting_dateinfo, 2, 98);
lv_obj_set_size(ui->setting_dateinfo, 443, 46);
//Write style for setting_dateinfo, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->setting_dateinfo, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->setting_dateinfo, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->setting_dateinfo, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->setting_dateinfo, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_letter_space(ui->setting_dateinfo, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_line_space(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->setting_dateinfo, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->setting_dateinfo, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->setting_dateinfo, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->setting_dateinfo, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_color(ui->setting_dateinfo, lv_color_hex(0x212121), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_main_stop(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_stop(ui->setting_dateinfo, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->setting_dateinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes setting_dateinfoimg_1
ui->setting_dateinfoimg_1 = lv_img_create(ui->setting_cont_1);
lv_obj_add_flag(ui->setting_dateinfoimg_1, LV_OBJ_FLAG_CLICKABLE);
lv_img_set_src(ui->setting_dateinfoimg_1, LVGL_PATH(setdate.png));
lv_img_set_pivot(ui->setting_dateinfoimg_1, 0,0);
lv_img_set_angle(ui->setting_dateinfoimg_1, 0);
lv_obj_set_pos(ui->setting_dateinfoimg_1, 14, 106);
lv_obj_set_size(ui->setting_dateinfoimg_1, 30, 30);
//Write style for setting_dateinfoimg_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_img_opa(ui->setting_dateinfoimg_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes setting_dateinfoimg_2
ui->setting_dateinfoimg_2 = lv_img_create(ui->setting_cont_1);
lv_obj_add_flag(ui->setting_dateinfoimg_2, LV_OBJ_FLAG_CLICKABLE);
lv_img_set_src(ui->setting_dateinfoimg_2, LVGL_PATH(nextpagebg.png));
lv_img_set_pivot(ui->setting_dateinfoimg_2, 0,0);
lv_img_set_angle(ui->setting_dateinfoimg_2, 0);
lv_obj_set_pos(ui->setting_dateinfoimg_2, 424, 113);
lv_obj_set_size(ui->setting_dateinfoimg_2, 14, 22);
//Write style for setting_dateinfoimg_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_img_opa(ui->setting_dateinfoimg_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes setting_dateinfolabel_1
ui->setting_dateinfolabel_1 = lv_label_create(ui->setting_cont_1);
//lv_label_set_text(ui->setting_dateinfolabel_1, "Clock & time");
lv_label_set_text(ui->setting_dateinfolabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetClock]);
lv_label_set_long_mode(ui->setting_dateinfolabel_1, LV_LABEL_LONG_DOT);
lv_obj_set_pos(ui->setting_dateinfolabel_1, 50, 113);
lv_obj_set_size(ui->setting_dateinfolabel_1, 200, 24);
//Write style for setting_dateinfolabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->setting_dateinfolabel_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->setting_dateinfolabel_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->setting_dateinfolabel_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_letter_space(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_line_space(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->setting_dateinfolabel_1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->setting_dateinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes setting_dateinfobtn_1
ui->setting_dateinfobtn_1 = lv_btn_create(ui->setting_cont_1);
// ui->setting_dateinfobtn_1_label = lv_label_create(ui->setting_dateinfobtn_1);
// lv_label_set_text(ui->setting_dateinfobtn_1_label, "");
// lv_label_set_long_mode(ui->setting_dateinfobtn_1_label, LV_LABEL_LONG_WRAP);
// lv_obj_align(ui->setting_dateinfobtn_1_label, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_pad_all(ui->setting_dateinfobtn_1, 0, LV_STATE_DEFAULT);
// lv_obj_set_width(ui->setting_dateinfobtn_1_label, LV_PCT(100));
lv_obj_set_pos(ui->setting_dateinfobtn_1, 15, 106);
lv_obj_set_size(ui->setting_dateinfobtn_1, 420, 30);
//Write style for setting_dateinfobtn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->setting_dateinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->setting_dateinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->setting_dateinfobtn_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->setting_dateinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_color(ui->setting_dateinfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_font(ui->setting_dateinfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_opa(ui->setting_dateinfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_align(ui->setting_dateinfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes setting_langinfo
ui->setting_langinfo = lv_label_create(ui->setting_cont_1);
lv_label_set_text(ui->setting_langinfo, "");
lv_label_set_long_mode(ui->setting_langinfo, LV_LABEL_LONG_DOT);
lv_obj_set_pos(ui->setting_langinfo, 2, 98);
lv_obj_set_pos(ui->setting_langinfo, 2, 146);
lv_obj_set_size(ui->setting_langinfo, 443, 46);
//Write style for setting_langinfo, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -312,7 +402,7 @@ void setup_scr_setting(lv_ui *ui)
lv_img_set_src(ui->setting_langinfoimg_1, LVGL_PATH(langaugebg.png));
lv_img_set_pivot(ui->setting_langinfoimg_1, 0,0);
lv_img_set_angle(ui->setting_langinfoimg_1, 0);
lv_obj_set_pos(ui->setting_langinfoimg_1, 14, 106);
lv_obj_set_pos(ui->setting_langinfoimg_1, 14, 154);
lv_obj_set_size(ui->setting_langinfoimg_1, 30, 30);
//Write style for setting_langinfoimg_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -324,7 +414,7 @@ void setup_scr_setting(lv_ui *ui)
lv_img_set_src(ui->setting_langinfoimg_2, LVGL_PATH(nextpagebg.png));
lv_img_set_pivot(ui->setting_langinfoimg_2, 0,0);
lv_img_set_angle(ui->setting_langinfoimg_2, 0);
lv_obj_set_pos(ui->setting_langinfoimg_2, 424, 109);
lv_obj_set_pos(ui->setting_langinfoimg_2, 424, 161);
lv_obj_set_size(ui->setting_langinfoimg_2, 14, 22);
//Write style for setting_langinfoimg_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -333,10 +423,10 @@ void setup_scr_setting(lv_ui *ui)
//Write codes setting_langinfolabel_1
ui->setting_langinfolabel_1 = lv_label_create(ui->setting_cont_1);
//lv_label_set_text(ui->setting_langinfolabel_1, "Language");
lv_label_set_text(ui->setting_langinfolabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetLanguange]);
lv_label_set_text(ui->setting_langinfolabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetLanguange]);
lv_label_set_long_mode(ui->setting_langinfolabel_1, LV_LABEL_LONG_DOT);
lv_obj_set_pos(ui->setting_langinfolabel_1, 50, 113);
lv_obj_set_size(ui->setting_langinfolabel_1, 150, 24);
lv_obj_set_pos(ui->setting_langinfolabel_1, 50, 161);
lv_obj_set_size(ui->setting_langinfolabel_1, 200, 24);
//Write style for setting_langinfolabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->setting_langinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
@@ -362,7 +452,7 @@ void setup_scr_setting(lv_ui *ui)
//lv_obj_align(ui->setting_langinfobtn_1_label, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_pad_all(ui->setting_langinfobtn_1, 0, LV_STATE_DEFAULT);
//lv_obj_set_width(ui->setting_langinfobtn_1_label, LV_PCT(100));
lv_obj_set_pos(ui->setting_langinfobtn_1, 15, 106);
lv_obj_set_pos(ui->setting_langinfobtn_1, 15, 154);
lv_obj_set_size(ui->setting_langinfobtn_1, 420, 30);
//Write style for setting_langinfobtn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -379,7 +469,7 @@ void setup_scr_setting(lv_ui *ui)
ui->setting_smartconfiginfo = lv_label_create(ui->setting_cont_1);
lv_label_set_text(ui->setting_smartconfiginfo, "");
lv_label_set_long_mode(ui->setting_smartconfiginfo, LV_LABEL_LONG_DOT);
lv_obj_set_pos(ui->setting_smartconfiginfo, 2, 146);
lv_obj_set_pos(ui->setting_smartconfiginfo, 2, 194);
lv_obj_set_size(ui->setting_smartconfiginfo, 443, 46);
//Write style for setting_smartconfiginfo, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -409,7 +499,7 @@ void setup_scr_setting(lv_ui *ui)
lv_img_set_src(ui->setting_smartconfiimg_1, LVGL_PATH(zigbeeinfo.png));
lv_img_set_pivot(ui->setting_smartconfiimg_1, 0,0);
lv_img_set_angle(ui->setting_smartconfiimg_1, 0);
lv_obj_set_pos(ui->setting_smartconfiimg_1, 14, 154);
lv_obj_set_pos(ui->setting_smartconfiimg_1, 14, 202);
lv_obj_set_size(ui->setting_smartconfiimg_1, 30, 30);
//Write style for setting_smartconfiimg_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -421,7 +511,7 @@ void setup_scr_setting(lv_ui *ui)
lv_img_set_src(ui->setting_smartconfiimg_2, LVGL_PATH(nextpagebg.png));
lv_img_set_pivot(ui->setting_smartconfiimg_2, 0,0);
lv_img_set_angle(ui->setting_smartconfiimg_2, 0);
lv_obj_set_pos(ui->setting_smartconfiimg_2, 424, 157);
lv_obj_set_pos(ui->setting_smartconfiimg_2, 424, 209);
lv_obj_set_size(ui->setting_smartconfiimg_2, 14, 22);
//Write style for setting_smartconfiimg_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -430,10 +520,10 @@ void setup_scr_setting(lv_ui *ui)
//Write codes setting_smartconfilabel_1
ui->setting_smartconfilabel_1 = lv_label_create(ui->setting_cont_1);
//lv_label_set_text(ui->setting_smartconfilabel_1, "Network");
lv_label_set_text(ui->setting_smartconfilabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetNetwork]);
lv_label_set_text(ui->setting_smartconfilabel_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetNetwork]);
lv_label_set_long_mode(ui->setting_smartconfilabel_1, LV_LABEL_LONG_DOT);
lv_obj_set_pos(ui->setting_smartconfilabel_1, 50, 161);
lv_obj_set_size(ui->setting_smartconfilabel_1, 150, 24);
lv_obj_set_pos(ui->setting_smartconfilabel_1, 50, 209);
lv_obj_set_size(ui->setting_smartconfilabel_1, 200, 24);
//Write style for setting_smartconfilabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->setting_smartconfilabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
@@ -459,7 +549,7 @@ void setup_scr_setting(lv_ui *ui)
//lv_obj_align(ui->setting_smartconfibtn_1_label, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_pad_all(ui->setting_smartconfibtn_1, 0, LV_STATE_DEFAULT);
//lv_obj_set_width(ui->setting_smartconfibtn_1_label, LV_PCT(100));
lv_obj_set_pos(ui->setting_smartconfibtn_1, 15, 154);
lv_obj_set_pos(ui->setting_smartconfibtn_1, 15, 202);
lv_obj_set_size(ui->setting_smartconfibtn_1, 420, 30);
//Write style for setting_smartconfibtn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -468,7 +558,7 @@ void setup_scr_setting(lv_ui *ui)
lv_obj_set_style_radius(ui->setting_smartconfibtn_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->setting_smartconfibtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_color(ui->setting_smartconfibtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_font(ui->setting_smartconfibtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_font(ui->setting_smartconfibtn_1, &lv_font_simsun_12, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_opa(ui->setting_smartconfibtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_align(ui->setting_smartconfibtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
@@ -476,7 +566,7 @@ void setup_scr_setting(lv_ui *ui)
ui->setting_firstinfo = lv_label_create(ui->setting_cont_1);
lv_label_set_text(ui->setting_firstinfo, "");
lv_label_set_long_mode(ui->setting_firstinfo, LV_LABEL_LONG_DOT);
lv_obj_set_pos(ui->setting_firstinfo, 2, 194);
lv_obj_set_pos(ui->setting_firstinfo, 2, 242);
lv_obj_set_size(ui->setting_firstinfo, 443, 46);
//Write style for setting_firstinfo, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -506,7 +596,7 @@ void setup_scr_setting(lv_ui *ui)
lv_img_set_src(ui->setting_firstinfoimg_1, LVGL_PATH(setcj.png));
lv_img_set_pivot(ui->setting_firstinfoimg_1, 0,0);
lv_img_set_angle(ui->setting_firstinfoimg_1, 0);
lv_obj_set_pos(ui->setting_firstinfoimg_1, 14, 202);
lv_obj_set_pos(ui->setting_firstinfoimg_1, 14, 250);
lv_obj_set_size(ui->setting_firstinfoimg_1, 30, 30);
//Write style for setting_firstinfoimg_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -518,7 +608,7 @@ void setup_scr_setting(lv_ui *ui)
lv_img_set_src(ui->setting_firstinfoimg_2, LVGL_PATH(nextpagebg.png));
lv_img_set_pivot(ui->setting_firstinfoimg_2, 0,0);
lv_img_set_angle(ui->setting_firstinfoimg_2, 0);
lv_obj_set_pos(ui->setting_firstinfoimg_2, 424, 205);
lv_obj_set_pos(ui->setting_firstinfoimg_2, 424, 257);
lv_obj_set_size(ui->setting_firstinfoimg_2, 14, 22);
//Write style for setting_firstinfoimg_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -527,10 +617,10 @@ void setup_scr_setting(lv_ui *ui)
//Write codes setting_firstinfolabel_1
ui->setting_firstinfolabel_1 = lv_label_create(ui->setting_cont_1);
//lv_label_set_text(ui->setting_firstinfolabel_1, "First screen");
lv_label_set_text(ui->setting_firstinfolabel_1, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetFirstScreen]);
lv_label_set_text(ui->setting_firstinfolabel_1, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetFirstScreen]);
lv_label_set_long_mode(ui->setting_firstinfolabel_1, LV_LABEL_LONG_DOT);
lv_obj_set_pos(ui->setting_firstinfolabel_1, 50, 209);
lv_obj_set_size(ui->setting_firstinfolabel_1, 150, 24);
lv_obj_set_pos(ui->setting_firstinfolabel_1, 50, 257);
lv_obj_set_size(ui->setting_firstinfolabel_1, 200, 24);
//Write style for setting_firstinfolabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->setting_firstinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
@@ -556,7 +646,7 @@ void setup_scr_setting(lv_ui *ui)
//lv_obj_align(ui->setting_firstinfobtn_1_label, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_pad_all(ui->setting_firstinfobtn_1, 0, LV_STATE_DEFAULT);
//lv_obj_set_width(ui->setting_firstinfobtn_1_label, LV_PCT(100));
lv_obj_set_pos(ui->setting_firstinfobtn_1, 15, 202);
lv_obj_set_pos(ui->setting_firstinfobtn_1, 15, 250);
lv_obj_set_size(ui->setting_firstinfobtn_1, 420, 30);
//Write style for setting_firstinfobtn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -564,23 +654,23 @@ void setup_scr_setting(lv_ui *ui)
lv_obj_set_style_border_width(ui->setting_firstinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->setting_firstinfobtn_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->setting_firstinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_color(ui->setting_firstinfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_font(ui->setting_firstinfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_opa(ui->setting_firstinfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_align(ui->setting_firstinfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
//lv_obj_set_style_text_color(ui->setting_firstinfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
//lv_obj_set_style_text_font(ui->setting_firstinfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
//lv_obj_set_style_text_opa(ui->setting_firstinfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
//lv_obj_set_style_text_align(ui->setting_firstinfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
// //Write codes setting_relayinfo
// ui->setting_relayinfo = lv_label_create(ui->setting_cont_1);
// lv_label_set_text(ui->setting_relayinfo, "");
// lv_label_set_long_mode(ui->setting_relayinfo, LV_LABEL_LONG_DOT);
// lv_obj_set_pos(ui->setting_relayinfo, 2, 242);
// lv_obj_set_pos(ui->setting_relayinfo, 2, 290);
// lv_obj_set_size(ui->setting_relayinfo, 443, 46);
// //Write style for setting_relayinfo, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
// lv_obj_set_style_border_width(ui->setting_relayinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_radius(ui->setting_relayinfo, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_color(ui->setting_relayinfo, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_font(ui->setting_relayinfo, &lv_font_DroidSansFallback_12, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_font(ui->setting_relayinfo, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_opa(ui->setting_relayinfo, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_letter_space(ui->setting_relayinfo, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_line_space(ui->setting_relayinfo, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
@@ -600,10 +690,10 @@ void setup_scr_setting(lv_ui *ui)
// //Write codes setting_relayinfoimg_1
// ui->setting_relayinfoimg_1 = lv_img_create(ui->setting_cont_1);
// lv_obj_add_flag(ui->setting_relayinfoimg_1, LV_OBJ_FLAG_CLICKABLE);
// lv_img_set_src(ui->setting_relayinfoimg_1, LVGL_PATH(relay3icon.png));
// lv_img_set_src(ui->setting_relayinfoimg_1, &_relay3icon_alpha_30x30);
// lv_img_set_pivot(ui->setting_relayinfoimg_1, 0,0);
// lv_img_set_angle(ui->setting_relayinfoimg_1, 0);
// lv_obj_set_pos(ui->setting_relayinfoimg_1, 14, 250);
// lv_obj_set_pos(ui->setting_relayinfoimg_1, 14, 298);
// lv_obj_set_size(ui->setting_relayinfoimg_1, 30, 30);
// //Write style for setting_relayinfoimg_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -612,22 +702,21 @@ void setup_scr_setting(lv_ui *ui)
// //Write codes setting_relayinfoimg_2
// ui->setting_relayinfoimg_2 = lv_img_create(ui->setting_cont_1);
// lv_obj_add_flag(ui->setting_relayinfoimg_2, LV_OBJ_FLAG_CLICKABLE);
// lv_img_set_src(ui->setting_relayinfoimg_2, LVGL_PATH(nextpagebg.png));
// lv_img_set_src(ui->setting_relayinfoimg_2, &_nextpagebg_alpha_15x20);
// lv_img_set_pivot(ui->setting_relayinfoimg_2, 0,0);
// lv_img_set_angle(ui->setting_relayinfoimg_2, 0);
// lv_obj_set_pos(ui->setting_relayinfoimg_2, 424, 253);
// lv_obj_set_size(ui->setting_relayinfoimg_2, 14, 22);
// lv_obj_set_pos(ui->setting_relayinfoimg_2, 424, 305);
// lv_obj_set_size(ui->setting_relayinfoimg_2, 15, 20);
// //Write style for setting_relayinfoimg_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
// lv_obj_set_style_img_opa(ui->setting_relayinfoimg_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
// //Write codes setting_relayinfolabel_1
// ui->setting_relayinfolabel_1 = lv_label_create(ui->setting_cont_1);
// //lv_label_set_text(ui->setting_relayinfolabel_1, "Relay select");
// lv_label_set_text(ui->setting_relayinfolabel_1, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetRelay]);
// lv_label_set_text(ui->setting_relayinfolabel_1, "Relay select");
// lv_label_set_long_mode(ui->setting_relayinfolabel_1, LV_LABEL_LONG_DOT);
// lv_obj_set_pos(ui->setting_relayinfolabel_1, 50, 257);
// lv_obj_set_size(ui->setting_relayinfolabel_1, 150, 24);
// lv_obj_set_pos(ui->setting_relayinfolabel_1, 50, 305);
// lv_obj_set_size(ui->setting_relayinfolabel_1, 200, 24);
// //Write style for setting_relayinfolabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
// lv_obj_set_style_border_width(ui->setting_relayinfolabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
@@ -647,13 +736,13 @@ void setup_scr_setting(lv_ui *ui)
// //Write codes setting_relayinfobtn_1
// ui->setting_relayinfobtn_1 = lv_btn_create(ui->setting_cont_1);
// //ui->setting_relayinfobtn_1_label = lv_label_create(ui->setting_relayinfobtn_1);
// //lv_label_set_text(ui->setting_relayinfobtn_1_label, "");
// //lv_label_set_long_mode(ui->setting_relayinfobtn_1_label, LV_LABEL_LONG_DOT);
// //lv_obj_align(ui->setting_relayinfobtn_1_label, LV_ALIGN_CENTER, 0, 0);
// ui->setting_relayinfobtn_1_label = lv_label_create(ui->setting_relayinfobtn_1);
// lv_label_set_text(ui->setting_relayinfobtn_1_label, "");
// lv_label_set_long_mode(ui->setting_relayinfobtn_1_label, LV_LABEL_LONG_WRAP);
// lv_obj_align(ui->setting_relayinfobtn_1_label, LV_ALIGN_CENTER, 0, 0);
// lv_obj_set_style_pad_all(ui->setting_relayinfobtn_1, 0, LV_STATE_DEFAULT);
// //lv_obj_set_width(ui->setting_relayinfobtn_1_label, LV_PCT(100));
// lv_obj_set_pos(ui->setting_relayinfobtn_1, 15, 250);
// lv_obj_set_width(ui->setting_relayinfobtn_1_label, LV_PCT(100));
// lv_obj_set_pos(ui->setting_relayinfobtn_1, 15, 298);
// lv_obj_set_size(ui->setting_relayinfobtn_1, 420, 30);
// //Write style for setting_relayinfobtn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
@@ -661,13 +750,13 @@ void setup_scr_setting(lv_ui *ui)
// lv_obj_set_style_border_width(ui->setting_relayinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_radius(ui->setting_relayinfobtn_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_shadow_width(ui->setting_relayinfobtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
// // lv_obj_set_style_text_color(ui->setting_relayinfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
// // lv_obj_set_style_text_font(ui->setting_relayinfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
// // lv_obj_set_style_text_opa(ui->setting_relayinfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
// // lv_obj_set_style_text_align(ui->setting_relayinfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_color(ui->setting_relayinfobtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_font(ui->setting_relayinfobtn_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_opa(ui->setting_relayinfobtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_align(ui->setting_relayinfobtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
//The custom code of setting.
#if defined(CONFIG_USER_RELAY_3)||defined(CONFIG_USER_RELAY_4)
#endif
//Update current screen layout.
@@ -676,3 +765,4 @@ void setup_scr_setting(lv_ui *ui)
//Init events for screen.
events_init_setting(ui);
}

View File

@@ -68,7 +68,7 @@ void setup_scr_smartinfopage(lv_ui *ui)
lv_label_set_long_mode(ui->smartinfopage_label_1, LV_LABEL_LONG_DOT);
lv_obj_set_pos(ui->smartinfopage_label_1, 46, 32);
lv_obj_set_size(ui->smartinfopage_label_1, 200, 20);
lv_obj_set_size(ui->smartinfopage_label_1, 300, 20);
//Write style for smartinfopage_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->smartinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);