mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-15 10:58:54 +00:00
524 lines
36 KiB
C
524 lines
36 KiB
C
/*
|
|
* 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 "lvgl.h"
|
|
#include <stdio.h>
|
|
#include "gui_guider.h"
|
|
#include "events_init.h"
|
|
#include "widgets_init.h"
|
|
#include "custom.h"
|
|
|
|
|
|
|
|
void setup_scr_screen_main(lv_ui *ui)
|
|
{
|
|
//Write codes screen_main
|
|
ui->screen_main = lv_obj_create(NULL);
|
|
lv_obj_set_pos(ui->screen_main, 0, 0);
|
|
lv_obj_set_size(ui->screen_main, 480, 480);
|
|
lv_obj_set_scrollbar_mode(ui->screen_main, LV_SCROLLBAR_MODE_OFF);
|
|
|
|
//Write style for screen_main, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_bg_opa(ui->screen_main, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_color(ui->screen_main, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_grad_dir(ui->screen_main, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_tileview
|
|
ui->screen_main_tileview = lv_tileview_create(ui->screen_main);
|
|
lv_obj_set_pos(ui->screen_main_tileview, 0, 0);
|
|
lv_obj_set_size(ui->screen_main_tileview, 480, 480);
|
|
|
|
lv_obj_set_scrollbar_mode(ui->screen_main_tileview, LV_SCROLLBAR_MODE_OFF);
|
|
lv_obj_remove_style(ui->screen_main_tileview, NULL, LV_PART_SCROLLBAR);///隐藏/移除滚动条
|
|
|
|
//Write style for screen_main_tileview, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_bg_opa(ui->screen_main_tileview, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_main_tileview, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->screen_main_tileview, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write style for screen_main_tileview, Part: LV_PART_SCROLLBAR, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_bg_opa(ui->screen_main_tileview, 0, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_color(ui->screen_main_tileview, lv_color_hex(0x000000), LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_grad_dir(ui->screen_main_tileview, LV_GRAD_DIR_NONE, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_main_tileview, 0, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
|
|
|
ui->screen_main_tileview_scenes = lv_tileview_add_tile(ui->screen_main_tileview, 0, 0, LV_DIR_NONE);//LV_DIR_RIGHT //LV_DIR_NONE
|
|
ui->screen_main_tileview_onoffs = lv_tileview_add_tile(ui->screen_main_tileview, 1, 0, LV_DIR_NONE);//LV_DIR_LEFT | LV_DIR_RIGHT //LV_DIR_NONE
|
|
ui->screen_main_tileview_dimmers = lv_tileview_add_tile(ui->screen_main_tileview, 2, 0, LV_DIR_NONE);//LV_DIR_LEFT | LV_DIR_RIGHT //LV_DIR_NONE
|
|
ui->screen_main_tileview_curtains = lv_tileview_add_tile(ui->screen_main_tileview, 3, 0, LV_DIR_NONE);//LV_DIR_LEFT | LV_DIR_RIGHT //LV_DIR_NONE
|
|
ui->screen_main_tileview_devices = lv_tileview_add_tile(ui->screen_main_tileview, 4, 0, LV_DIR_NONE);//LV_DIR_LEFT //LV_DIR_NONE
|
|
//ui->screen_main_tileview_settings = lv_tileview_add_tile(ui->screen_main_tileview, 5, 0, LV_DIR_NONE);
|
|
|
|
// //Write codes screen_main_scenescont
|
|
// ui->screen_main_scenescont = lv_obj_create(ui->screen_main_tileview_scenes);
|
|
// lv_obj_set_pos(ui->screen_main_scenescont, 0, 0);
|
|
// lv_obj_set_size(ui->screen_main_scenescont, 480, 480);
|
|
// lv_obj_set_scrollbar_mode(ui->screen_main_scenescont, LV_SCROLLBAR_MODE_OFF);
|
|
|
|
// //Write style for screen_main_scenescont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
// lv_obj_set_style_border_width(ui->screen_main_scenescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_radius(ui->screen_main_scenescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_opa(ui->screen_main_scenescont, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_color(ui->screen_main_scenescont, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_grad_dir(ui->screen_main_scenescont, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_top(ui->screen_main_scenescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_bottom(ui->screen_main_scenescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_left(ui->screen_main_scenescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_right(ui->screen_main_scenescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_shadow_width(ui->screen_main_scenescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
setup_scr_scene(ui);
|
|
//----------------------------------------
|
|
// //Write codes screen_main_onoffscont
|
|
// ui->screen_main_onoffscont = lv_obj_create(ui->screen_main_tileview_onoffs);
|
|
// lv_obj_set_pos(ui->screen_main_onoffscont, 0, 0);
|
|
// lv_obj_set_size(ui->screen_main_onoffscont, 480, 480);
|
|
// lv_obj_set_scrollbar_mode(ui->screen_main_onoffscont, LV_SCROLLBAR_MODE_OFF);
|
|
|
|
// //Write style for screen_main_onoffscont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
// lv_obj_set_style_border_width(ui->screen_main_onoffscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_radius(ui->screen_main_onoffscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_opa(ui->screen_main_onoffscont, 102, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_color(ui->screen_main_onoffscont, lv_color_hex(0x00ffd9), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_grad_dir(ui->screen_main_onoffscont, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_top(ui->screen_main_onoffscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_bottom(ui->screen_main_onoffscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_left(ui->screen_main_onoffscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_right(ui->screen_main_onoffscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_shadow_width(ui->screen_main_onoffscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
//加载switch界面
|
|
if(GET_nvs_Sys_Info_first()==FIRST_CLOCK)
|
|
{//时钟+开关模式
|
|
#if defined(CONFIG_USER_RELAY_1)
|
|
setup_scr_onofftime1(ui);
|
|
#elif defined(CONFIG_USER_RELAY_2)
|
|
setup_scr_onofftime2(ui);
|
|
#elif defined(CONFIG_USER_RELAY_3)
|
|
setup_scr_onofftime3(ui);
|
|
#elif defined(CONFIG_USER_RELAY_4)
|
|
setup_scr_onofftime4(ui);
|
|
#endif
|
|
}
|
|
else //if(GET_nvs_Sys_Info_first()==FIRST_SWITCH)
|
|
{//开关模式
|
|
#if defined(CONFIG_USER_RELAY_1)
|
|
setup_scr_onoff1(ui);
|
|
#elif defined(CONFIG_USER_RELAY_2)
|
|
setup_scr_onoff2(ui);
|
|
#elif defined(CONFIG_USER_RELAY_3)
|
|
setup_scr_onoff3(ui);
|
|
#elif defined(CONFIG_USER_RELAY_4)
|
|
setup_scr_onoff4(ui);
|
|
#endif
|
|
}
|
|
|
|
// //Write codes screen_main_dimmerscont
|
|
// ui->screen_main_dimmerscont = lv_obj_create(ui->screen_main_tileview_dimmers);
|
|
// lv_obj_set_pos(ui->screen_main_dimmerscont, 0, 0);
|
|
// lv_obj_set_size(ui->screen_main_dimmerscont, 480, 480);
|
|
// lv_obj_set_scrollbar_mode(ui->screen_main_dimmerscont, LV_SCROLLBAR_MODE_OFF);
|
|
|
|
// //Write style for screen_main_dimmerscont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
// lv_obj_set_style_border_width(ui->screen_main_dimmerscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_radius(ui->screen_main_dimmerscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_opa(ui->screen_main_dimmerscont, 106, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_color(ui->screen_main_dimmerscont, lv_color_hex(0x2200ff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_grad_dir(ui->screen_main_dimmerscont, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_top(ui->screen_main_dimmerscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_bottom(ui->screen_main_dimmerscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_left(ui->screen_main_dimmerscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_right(ui->screen_main_dimmerscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_shadow_width(ui->screen_main_dimmerscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
setup_scr_dimmer(ui);
|
|
|
|
//Write codes screen_main_curtainscont
|
|
// ui->screen_main_curtainscont = lv_obj_create(ui->screen_main_tileview_curtains);
|
|
// lv_obj_set_pos(ui->screen_main_curtainscont, 0, 0);
|
|
// lv_obj_set_size(ui->screen_main_curtainscont, 480, 480);
|
|
// lv_obj_set_scrollbar_mode(ui->screen_main_curtainscont, LV_SCROLLBAR_MODE_OFF);
|
|
|
|
// //Write style for screen_main_curtainscont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
// lv_obj_set_style_border_width(ui->screen_main_curtainscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_radius(ui->screen_main_curtainscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_opa(ui->screen_main_curtainscont, 89, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_color(ui->screen_main_curtainscont, lv_color_hex(0xff00e9), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_grad_dir(ui->screen_main_curtainscont, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_top(ui->screen_main_curtainscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_bottom(ui->screen_main_curtainscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_left(ui->screen_main_curtainscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_right(ui->screen_main_curtainscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_shadow_width(ui->screen_main_curtainscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
setup_scr_curtain(ui);
|
|
|
|
|
|
// //Write codes screen_main_devicescont
|
|
// ui->screen_main_devicescont = lv_obj_create(ui->screen_main_tileview_devices);
|
|
// lv_obj_set_pos(ui->screen_main_devicescont, 0, 0);
|
|
// lv_obj_set_size(ui->screen_main_devicescont, 480, 480);
|
|
// lv_obj_set_scrollbar_mode(ui->screen_main_devicescont, LV_SCROLLBAR_MODE_OFF);
|
|
|
|
// //Write style for screen_main_devicescont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
// lv_obj_set_style_border_width(ui->screen_main_devicescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_radius(ui->screen_main_devicescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_opa(ui->screen_main_devicescont, 108, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_color(ui->screen_main_devicescont, lv_color_hex(0xffd400), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_grad_dir(ui->screen_main_devicescont, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_top(ui->screen_main_devicescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_bottom(ui->screen_main_devicescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_left(ui->screen_main_devicescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_right(ui->screen_main_devicescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_shadow_width(ui->screen_main_devicescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
setup_scr_device(ui);
|
|
|
|
|
|
// //Write codes screen_main_settingscont
|
|
// ui->screen_main_settingscont = lv_obj_create(ui->screen_main_tileview_settings);
|
|
// lv_obj_set_pos(ui->screen_main_settingscont, 0, 0);
|
|
// lv_obj_set_size(ui->screen_main_settingscont, 480, 480);
|
|
// lv_obj_set_scrollbar_mode(ui->screen_main_settingscont, LV_SCROLLBAR_MODE_OFF);
|
|
|
|
// //Write style for screen_main_settingscont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
// lv_obj_set_style_border_width(ui->screen_main_settingscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_radius(ui->screen_main_settingscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_opa(ui->screen_main_settingscont, 161, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_color(ui->screen_main_settingscont, lv_color_hex(0x2178d0), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_bg_grad_dir(ui->screen_main_settingscont, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_top(ui->screen_main_settingscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_bottom(ui->screen_main_settingscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_left(ui->screen_main_settingscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_pad_right(ui->screen_main_settingscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
// lv_obj_set_style_shadow_width(ui->screen_main_settingscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navicont
|
|
ui->screen_main_navicont = lv_obj_create(ui->screen_main);
|
|
lv_obj_set_pos(ui->screen_main_navicont, 20, 386);
|
|
lv_obj_set_size(ui->screen_main_navicont, 440, 74);
|
|
lv_obj_set_scrollbar_mode(ui->screen_main_navicont, LV_SCROLLBAR_MODE_OFF);
|
|
|
|
//Write style for screen_main_navicont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_border_width(ui->screen_main_navicont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_main_navicont, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_opa(ui->screen_main_navicont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_top(ui->screen_main_navicont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_bottom(ui->screen_main_navicont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_left(ui->screen_main_navicont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_right(ui->screen_main_navicont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->screen_main_navicont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_bg
|
|
ui->screen_main_navi_bg = lv_img_create(ui->screen_main_navicont);
|
|
lv_obj_add_flag(ui->screen_main_navi_bg, LV_OBJ_FLAG_CLICKABLE);
|
|
lv_img_set_src(ui->screen_main_navi_bg, LVGL_PATH(navi_bg_440x74.png));
|
|
lv_img_set_pivot(ui->screen_main_navi_bg, 50,50);
|
|
lv_img_set_angle(ui->screen_main_navi_bg, 0);
|
|
lv_obj_set_pos(ui->screen_main_navi_bg, 0, 0);
|
|
lv_obj_set_size(ui->screen_main_navi_bg, 440, 74);
|
|
|
|
//Write style for screen_main_navi_bg, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_img_opa(ui->screen_main_navi_bg, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_scene_icon
|
|
ui->screen_main_navi_scene_icon = lv_img_create(ui->screen_main_navicont);
|
|
lv_obj_add_flag(ui->screen_main_navi_scene_icon, LV_OBJ_FLAG_CLICKABLE);
|
|
lv_img_set_src(ui->screen_main_navi_scene_icon, LVGL_PATH(navi_scenes_icon_s_29x29.png));
|
|
lv_img_set_pivot(ui->screen_main_navi_scene_icon, 50,50);
|
|
lv_img_set_angle(ui->screen_main_navi_scene_icon, 0);
|
|
lv_obj_set_pos(ui->screen_main_navi_scene_icon, 29, 15);
|
|
lv_obj_set_size(ui->screen_main_navi_scene_icon, 29, 29);
|
|
|
|
//Write style for screen_main_navi_scene_icon, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_img_opa(ui->screen_main_navi_scene_icon, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_scene_label
|
|
ui->screen_main_navi_scene_label = lv_label_create(ui->screen_main_navicont);
|
|
//lv_label_set_text(ui->screen_main_navi_scene_label, "Scene");
|
|
lv_label_set_text(ui->screen_main_navi_scene_label, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_Scence]);
|
|
lv_label_set_long_mode(ui->screen_main_navi_scene_label, LV_LABEL_LONG_WRAP);
|
|
lv_obj_set_pos(ui->screen_main_navi_scene_label, 0, 50);
|
|
lv_obj_set_size(ui->screen_main_navi_scene_label, 86, 20);
|
|
|
|
//Write style for screen_main_navi_scene_label, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_border_width(ui->screen_main_navi_scene_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_main_navi_scene_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_color(ui->screen_main_navi_scene_label, lv_color_hex(0xfdfdfd), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
//lv_obj_set_style_text_font(ui->screen_main_navi_scene_label, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_font(ui->screen_main_navi_scene_label, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_opa(ui->screen_main_navi_scene_label, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_letter_space(ui->screen_main_navi_scene_label, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_line_space(ui->screen_main_navi_scene_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_align(ui->screen_main_navi_scene_label, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_opa(ui->screen_main_navi_scene_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_top(ui->screen_main_navi_scene_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_right(ui->screen_main_navi_scene_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_bottom(ui->screen_main_navi_scene_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_left(ui->screen_main_navi_scene_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->screen_main_navi_scene_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_scene_btn
|
|
ui->screen_main_navi_scene_btn = lv_btn_create(ui->screen_main_navicont);
|
|
// ui->screen_main_navi_scene_btn_label = lv_label_create(ui->screen_main_navi_scene_btn);
|
|
// lv_label_set_text(ui->screen_main_navi_scene_btn_label, "");
|
|
// lv_label_set_long_mode(ui->screen_main_navi_scene_btn_label, LV_LABEL_LONG_WRAP);
|
|
//lv_obj_align(ui->screen_main_navi_scene_btn_label, LV_ALIGN_CENTER, 0, 0);
|
|
lv_obj_set_style_pad_all(ui->screen_main_navi_scene_btn, 0, LV_STATE_DEFAULT);
|
|
//lv_obj_set_width(ui->screen_main_navi_scene_btn_label, LV_PCT(100));
|
|
lv_obj_set_pos(ui->screen_main_navi_scene_btn, 12, 2);
|
|
lv_obj_set_size(ui->screen_main_navi_scene_btn, 65, 70);
|
|
|
|
//Write style for screen_main_navi_scene_btn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_bg_opa(ui->screen_main_navi_scene_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_border_width(ui->screen_main_navi_scene_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_main_navi_scene_btn, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->screen_main_navi_scene_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_color(ui->screen_main_navi_scene_btn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_font(ui->screen_main_navi_scene_btn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_opa(ui->screen_main_navi_scene_btn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_align(ui->screen_main_navi_scene_btn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_switch_icon
|
|
ui->screen_main_navi_switch_icon = lv_img_create(ui->screen_main_navicont);
|
|
lv_obj_add_flag(ui->screen_main_navi_switch_icon, LV_OBJ_FLAG_CLICKABLE);
|
|
lv_img_set_src(ui->screen_main_navi_switch_icon, LVGL_PATH(navi_sw_icon_38x21.png));
|
|
lv_img_set_pivot(ui->screen_main_navi_switch_icon, 50,50);
|
|
lv_img_set_angle(ui->screen_main_navi_switch_icon, 0);
|
|
lv_obj_set_pos(ui->screen_main_navi_switch_icon, 114, 20);
|
|
lv_obj_set_size(ui->screen_main_navi_switch_icon, 38, 21);
|
|
|
|
//Write style for screen_main_navi_switch_icon, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_img_opa(ui->screen_main_navi_switch_icon, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_switch_label
|
|
ui->screen_main_navi_switch_label = lv_label_create(ui->screen_main_navicont);
|
|
//lv_label_set_text(ui->screen_main_navi_switch_label, "Switch");
|
|
lv_label_set_text(ui->screen_main_navi_switch_label, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_Switch]);
|
|
lv_label_set_long_mode(ui->screen_main_navi_switch_label, LV_LABEL_LONG_WRAP);
|
|
lv_obj_set_pos(ui->screen_main_navi_switch_label, 92, 50);
|
|
lv_obj_set_size(ui->screen_main_navi_switch_label, 80, 20);
|
|
|
|
//Write style for screen_main_navi_switch_label, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_border_width(ui->screen_main_navi_switch_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_main_navi_switch_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_color(ui->screen_main_navi_switch_label, lv_color_hex(0xfdfdfd), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
//lv_obj_set_style_text_font(ui->screen_main_navi_switch_label, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_font(ui->screen_main_navi_switch_label, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_opa(ui->screen_main_navi_switch_label, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_letter_space(ui->screen_main_navi_switch_label, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_line_space(ui->screen_main_navi_switch_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_align(ui->screen_main_navi_switch_label, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_opa(ui->screen_main_navi_switch_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_top(ui->screen_main_navi_switch_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_right(ui->screen_main_navi_switch_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_bottom(ui->screen_main_navi_switch_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_left(ui->screen_main_navi_switch_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->screen_main_navi_switch_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_switch_btn
|
|
ui->screen_main_navi_switch_btn = lv_btn_create(ui->screen_main_navicont);
|
|
// ui->screen_main_navi_switch_btn_label = lv_label_create(ui->screen_main_navi_switch_btn);
|
|
// lv_label_set_text(ui->screen_main_navi_switch_btn_label, "");
|
|
// lv_label_set_long_mode(ui->screen_main_navi_switch_btn_label, LV_LABEL_LONG_WRAP);
|
|
//lv_obj_align(ui->screen_main_navi_switch_btn_label, LV_ALIGN_CENTER, 0, 0);
|
|
lv_obj_set_style_pad_all(ui->screen_main_navi_switch_btn, 0, LV_STATE_DEFAULT);
|
|
//lv_obj_set_width(ui->screen_main_navi_switch_btn_label, LV_PCT(100));
|
|
lv_obj_set_pos(ui->screen_main_navi_switch_btn, 98, 2);
|
|
lv_obj_set_size(ui->screen_main_navi_switch_btn, 65, 70);
|
|
|
|
//Write style for screen_main_navi_switch_btn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_bg_opa(ui->screen_main_navi_switch_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_border_width(ui->screen_main_navi_switch_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_main_navi_switch_btn, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->screen_main_navi_switch_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_color(ui->screen_main_navi_switch_btn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_font(ui->screen_main_navi_switch_btn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_opa(ui->screen_main_navi_switch_btn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_align(ui->screen_main_navi_switch_btn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_dimmer_icon
|
|
ui->screen_main_navi_dimmer_icon = lv_img_create(ui->screen_main_navicont);
|
|
lv_obj_add_flag(ui->screen_main_navi_dimmer_icon, LV_OBJ_FLAG_CLICKABLE);
|
|
lv_img_set_src(ui->screen_main_navi_dimmer_icon, LVGL_PATH(navi_dimmer_icon_30x30.png));
|
|
lv_img_set_pivot(ui->screen_main_navi_dimmer_icon, 50,50);
|
|
lv_img_set_angle(ui->screen_main_navi_dimmer_icon, 0);
|
|
lv_obj_set_pos(ui->screen_main_navi_dimmer_icon, 203, 16);
|
|
lv_obj_set_size(ui->screen_main_navi_dimmer_icon, 30, 30);
|
|
|
|
//Write style for screen_main_navi_dimmer_icon, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_img_opa(ui->screen_main_navi_dimmer_icon, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_dimmer_label
|
|
ui->screen_main_navi_dimmer_label = lv_label_create(ui->screen_main_navicont);
|
|
//lv_label_set_text(ui->screen_main_navi_dimmer_label, "Dimmer");
|
|
lv_label_set_text(ui->screen_main_navi_dimmer_label, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_Dimmertab]);
|
|
lv_label_set_long_mode(ui->screen_main_navi_dimmer_label, LV_LABEL_LONG_WRAP);
|
|
lv_obj_set_pos(ui->screen_main_navi_dimmer_label, 179, 50);
|
|
lv_obj_set_size(ui->screen_main_navi_dimmer_label, 80, 20);
|
|
|
|
//Write style for screen_main_navi_dimmer_label, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_border_width(ui->screen_main_navi_dimmer_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_main_navi_dimmer_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_color(ui->screen_main_navi_dimmer_label, lv_color_hex(0xfdfdfd), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
//lv_obj_set_style_text_font(ui->screen_main_navi_dimmer_label, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_font(ui->screen_main_navi_dimmer_label, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_opa(ui->screen_main_navi_dimmer_label, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_letter_space(ui->screen_main_navi_dimmer_label, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_line_space(ui->screen_main_navi_dimmer_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_align(ui->screen_main_navi_dimmer_label, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_opa(ui->screen_main_navi_dimmer_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_top(ui->screen_main_navi_dimmer_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_right(ui->screen_main_navi_dimmer_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_bottom(ui->screen_main_navi_dimmer_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_left(ui->screen_main_navi_dimmer_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->screen_main_navi_dimmer_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_dimmer_btn
|
|
ui->screen_main_navi_dimmer_btn = lv_btn_create(ui->screen_main_navicont);
|
|
// ui->screen_main_navi_dimmer_btn_label = lv_label_create(ui->screen_main_navi_dimmer_btn);
|
|
// lv_label_set_text(ui->screen_main_navi_dimmer_btn_label, "");
|
|
// lv_label_set_long_mode(ui->screen_main_navi_dimmer_btn_label, LV_LABEL_LONG_WRAP);
|
|
//lv_obj_align(ui->screen_main_navi_dimmer_btn_label, LV_ALIGN_CENTER, 0, 0);
|
|
lv_obj_set_style_pad_all(ui->screen_main_navi_dimmer_btn, 0, LV_STATE_DEFAULT);
|
|
//lv_obj_set_width(ui->screen_main_navi_dimmer_btn_label, LV_PCT(100));
|
|
lv_obj_set_pos(ui->screen_main_navi_dimmer_btn, 186, 2);
|
|
lv_obj_set_size(ui->screen_main_navi_dimmer_btn, 65, 70);
|
|
|
|
//Write style for screen_main_navi_dimmer_btn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_bg_opa(ui->screen_main_navi_dimmer_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_border_width(ui->screen_main_navi_dimmer_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_main_navi_dimmer_btn, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->screen_main_navi_dimmer_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_color(ui->screen_main_navi_dimmer_btn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_font(ui->screen_main_navi_dimmer_btn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_opa(ui->screen_main_navi_dimmer_btn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_align(ui->screen_main_navi_dimmer_btn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_cutain_icon
|
|
ui->screen_main_navi_cutain_icon = lv_img_create(ui->screen_main_navicont);
|
|
lv_obj_add_flag(ui->screen_main_navi_cutain_icon, LV_OBJ_FLAG_CLICKABLE);
|
|
lv_img_set_src(ui->screen_main_navi_cutain_icon, LVGL_PATH(navi_curtain_icon_24x24.png));
|
|
lv_img_set_pivot(ui->screen_main_navi_cutain_icon, 50,50);
|
|
lv_img_set_angle(ui->screen_main_navi_cutain_icon, 0);
|
|
lv_obj_set_pos(ui->screen_main_navi_cutain_icon, 296, 19);
|
|
lv_obj_set_size(ui->screen_main_navi_cutain_icon, 24, 24);
|
|
|
|
//Write style for screen_main_navi_cutain_icon, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_img_opa(ui->screen_main_navi_cutain_icon, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_cutain_label
|
|
ui->screen_main_navi_cutain_label = lv_label_create(ui->screen_main_navicont);
|
|
//lv_label_set_text(ui->screen_main_navi_cutain_label, "Cutain");
|
|
lv_label_set_text(ui->screen_main_navi_cutain_label, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_Curtaintab]);
|
|
lv_label_set_long_mode(ui->screen_main_navi_cutain_label, LV_LABEL_LONG_WRAP);
|
|
lv_obj_set_pos(ui->screen_main_navi_cutain_label, 268, 50);
|
|
lv_obj_set_size(ui->screen_main_navi_cutain_label, 80, 20);
|
|
|
|
//Write style for screen_main_navi_cutain_label, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_border_width(ui->screen_main_navi_cutain_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_main_navi_cutain_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_color(ui->screen_main_navi_cutain_label, lv_color_hex(0xfdfdfd), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
//lv_obj_set_style_text_font(ui->screen_main_navi_cutain_label, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_font(ui->screen_main_navi_cutain_label, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_opa(ui->screen_main_navi_cutain_label, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_letter_space(ui->screen_main_navi_cutain_label, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_line_space(ui->screen_main_navi_cutain_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_align(ui->screen_main_navi_cutain_label, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_opa(ui->screen_main_navi_cutain_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_top(ui->screen_main_navi_cutain_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_right(ui->screen_main_navi_cutain_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_bottom(ui->screen_main_navi_cutain_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_left(ui->screen_main_navi_cutain_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->screen_main_navi_cutain_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_cutain_btn
|
|
ui->screen_main_navi_cutain_btn = lv_btn_create(ui->screen_main_navicont);
|
|
// ui->screen_main_navi_cutain_btn_label = lv_label_create(ui->screen_main_navi_cutain_btn);
|
|
// lv_label_set_text(ui->screen_main_navi_cutain_btn_label, "");
|
|
// lv_label_set_long_mode(ui->screen_main_navi_cutain_btn_label, LV_LABEL_LONG_WRAP);
|
|
//lv_obj_align(ui->screen_main_navi_cutain_btn_label, LV_ALIGN_CENTER, 0, 0);
|
|
lv_obj_set_style_pad_all(ui->screen_main_navi_cutain_btn, 0, LV_STATE_DEFAULT);
|
|
//lv_obj_set_width(ui->screen_main_navi_cutain_btn_label, LV_PCT(100));
|
|
lv_obj_set_pos(ui->screen_main_navi_cutain_btn, 274, 2);
|
|
lv_obj_set_size(ui->screen_main_navi_cutain_btn, 65, 70);
|
|
|
|
//Write style for screen_main_navi_cutain_btn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_bg_opa(ui->screen_main_navi_cutain_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_border_width(ui->screen_main_navi_cutain_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_main_navi_cutain_btn, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->screen_main_navi_cutain_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_color(ui->screen_main_navi_cutain_btn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_font(ui->screen_main_navi_cutain_btn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_opa(ui->screen_main_navi_cutain_btn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_align(ui->screen_main_navi_cutain_btn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_device_icon
|
|
ui->screen_main_navi_device_icon = lv_img_create(ui->screen_main_navicont);
|
|
lv_obj_add_flag(ui->screen_main_navi_device_icon, LV_OBJ_FLAG_CLICKABLE);
|
|
lv_img_set_src(ui->screen_main_navi_device_icon, LVGL_PATH(navi_device_icon_24x24.png));
|
|
lv_img_set_pivot(ui->screen_main_navi_device_icon, 50,50);
|
|
lv_img_set_angle(ui->screen_main_navi_device_icon, 0);
|
|
lv_obj_set_pos(ui->screen_main_navi_device_icon, 383, 18);
|
|
lv_obj_set_size(ui->screen_main_navi_device_icon, 24, 24);
|
|
|
|
//Write style for screen_main_navi_device_icon, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_img_opa(ui->screen_main_navi_device_icon, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_device_label
|
|
ui->screen_main_navi_device_label = lv_label_create(ui->screen_main_navicont);
|
|
//lv_label_set_text(ui->screen_main_navi_device_label, "Device");
|
|
lv_label_set_text(ui->screen_main_navi_device_label, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_Device]);
|
|
lv_label_set_long_mode(ui->screen_main_navi_device_label, LV_LABEL_LONG_WRAP);
|
|
lv_obj_set_pos(ui->screen_main_navi_device_label, 356, 50);
|
|
lv_obj_set_size(ui->screen_main_navi_device_label, 80, 20);
|
|
|
|
//Write style for screen_main_navi_device_label, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_border_width(ui->screen_main_navi_device_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_main_navi_device_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_color(ui->screen_main_navi_device_label, lv_color_hex(0xfdfdfd), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
//lv_obj_set_style_text_font(ui->screen_main_navi_device_label, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_font(ui->screen_main_navi_device_label, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_opa(ui->screen_main_navi_device_label, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_letter_space(ui->screen_main_navi_device_label, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_line_space(ui->screen_main_navi_device_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_align(ui->screen_main_navi_device_label, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_opa(ui->screen_main_navi_device_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_top(ui->screen_main_navi_device_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_right(ui->screen_main_navi_device_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_bottom(ui->screen_main_navi_device_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_left(ui->screen_main_navi_device_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->screen_main_navi_device_label, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_main_navi_device_btn
|
|
ui->screen_main_navi_device_btn = lv_btn_create(ui->screen_main_navicont);
|
|
// ui->screen_main_navi_device_btn_label = lv_label_create(ui->screen_main_navi_device_btn);
|
|
// lv_label_set_text(ui->screen_main_navi_device_btn_label, "");
|
|
// lv_label_set_long_mode(ui->screen_main_navi_device_btn_label, LV_LABEL_LONG_WRAP);
|
|
//lv_obj_align(ui->screen_main_navi_device_btn_label, LV_ALIGN_CENTER, 0, 0);
|
|
lv_obj_set_style_pad_all(ui->screen_main_navi_device_btn, 0, LV_STATE_DEFAULT);
|
|
// lv_obj_set_width(ui->screen_main_navi_device_btn_label, LV_PCT(100));
|
|
lv_obj_set_pos(ui->screen_main_navi_device_btn, 362, 2);
|
|
lv_obj_set_size(ui->screen_main_navi_device_btn, 65, 70);
|
|
|
|
//Write style for screen_main_navi_device_btn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_bg_opa(ui->screen_main_navi_device_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_border_width(ui->screen_main_navi_device_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_main_navi_device_btn, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->screen_main_navi_device_btn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_color(ui->screen_main_navi_device_btn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_font(ui->screen_main_navi_device_btn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_opa(ui->screen_main_navi_device_btn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_align(ui->screen_main_navi_device_btn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//The custom code of screen_main.
|
|
|
|
|
|
//Update current screen layout.
|
|
lv_obj_update_layout(ui->screen_main);
|
|
|
|
//Init events for screen.
|
|
events_init_screen_main(ui);
|
|
}
|