/* * 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 #include "gui_guider.h" #include "events_init.h" #include "widgets_init.h" #include "custom.h" void setup_scr_screen_mainx(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_tabview ui->screen_main_tabview = lv_tabview_create(ui->screen_main, LV_DIR_TOP, 0); lv_obj_set_pos(ui->screen_main_tabview, 0, 0); lv_obj_set_size(ui->screen_main_tabview, 480, 480); //lv_obj_set_scrollbar_mode(ui->screen_main_tabview, LV_SCROLLBAR_MODE_OFF); lv_obj_clear_flag(ui->screen_main_tabview, LV_OBJ_FLAG_SCROLLABLE); // Flags lv_obj_set_scrollbar_mode(ui->screen_main_tabview, LV_SCROLLBAR_MODE_OFF);//隐藏掉滑动条 //Write style for screen_main_tabview, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->screen_main_tabview, 0, LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_text_color(ui->screen_main_tabview, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_text_font(ui->screen_main_tabview, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_main_tabview, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->screen_main_tabview, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->screen_main_tabview, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_border_width(ui->screen_main_tabview, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_main_tabview, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_main_tabview, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style state: LV_STATE_DEFAULT for &style_screen_main_tabview_extra_btnm_main_default static lv_style_t style_screen_main_tabview_extra_btnm_main_default; ui_init_style(&style_screen_main_tabview_extra_btnm_main_default); lv_style_set_bg_opa(&style_screen_main_tabview_extra_btnm_main_default, 0); lv_style_set_bg_color(&style_screen_main_tabview_extra_btnm_main_default, lv_color_hex(0x000000)); lv_style_set_bg_grad_dir(&style_screen_main_tabview_extra_btnm_main_default, LV_GRAD_DIR_NONE); lv_style_set_border_width(&style_screen_main_tabview_extra_btnm_main_default, 0); lv_style_set_radius(&style_screen_main_tabview_extra_btnm_main_default, 0); lv_obj_add_style(lv_tabview_get_tab_btns(ui->screen_main_tabview), &style_screen_main_tabview_extra_btnm_main_default, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style state: LV_STATE_DEFAULT for &style_screen_main_tabview_extra_btnm_items_default static lv_style_t style_screen_main_tabview_extra_btnm_items_default; ui_init_style(&style_screen_main_tabview_extra_btnm_items_default); lv_style_set_text_color(&style_screen_main_tabview_extra_btnm_items_default, lv_color_hex(0x000000)); lv_style_set_text_font(&style_screen_main_tabview_extra_btnm_items_default, &lv_font_simsun_16); lv_style_set_text_opa(&style_screen_main_tabview_extra_btnm_items_default, 0); lv_obj_add_style(lv_tabview_get_tab_btns(ui->screen_main_tabview), &style_screen_main_tabview_extra_btnm_items_default, LV_PART_ITEMS|LV_STATE_DEFAULT); //Write style state: LV_STATE_CHECKED for &style_screen_main_tabview_extra_btnm_items_checked static lv_style_t style_screen_main_tabview_extra_btnm_items_checked; ui_init_style(&style_screen_main_tabview_extra_btnm_items_checked); lv_style_set_text_color(&style_screen_main_tabview_extra_btnm_items_checked, lv_color_hex(0x000000)); lv_style_set_text_font(&style_screen_main_tabview_extra_btnm_items_checked, &lv_font_DroidSansFallback_12); lv_style_set_text_opa(&style_screen_main_tabview_extra_btnm_items_checked, 0); lv_style_set_border_width(&style_screen_main_tabview_extra_btnm_items_checked, 0); lv_style_set_border_opa(&style_screen_main_tabview_extra_btnm_items_checked, 255); lv_style_set_border_color(&style_screen_main_tabview_extra_btnm_items_checked, lv_color_hex(0x000000)); lv_style_set_border_side(&style_screen_main_tabview_extra_btnm_items_checked, LV_BORDER_SIDE_BOTTOM); lv_style_set_radius(&style_screen_main_tabview_extra_btnm_items_checked, 0); lv_style_set_bg_opa(&style_screen_main_tabview_extra_btnm_items_checked, 0); lv_style_set_bg_color(&style_screen_main_tabview_extra_btnm_items_checked, lv_color_hex(0x000000)); lv_style_set_bg_grad_dir(&style_screen_main_tabview_extra_btnm_items_checked, LV_GRAD_DIR_NONE); lv_obj_add_style(lv_tabview_get_tab_btns(ui->screen_main_tabview), &style_screen_main_tabview_extra_btnm_items_checked, LV_PART_ITEMS|LV_STATE_CHECKED); //Write codes scenes ui->screen_main_tabview_tab_1 = lv_tabview_add_tab(ui->screen_main_tabview,"scenes"); lv_obj_set_scrollbar_mode(ui->screen_main_tabview_tab_1,LV_SCROLLBAR_MODE_OFF);//不显示滚动条 lv_obj_clear_flag(ui->screen_main_tabview_tab_1, LV_OBJ_FLAG_SCROLLABLE); //止滚动 setup_scr_scene(ui); // lv_obj_t * screen_main_tabview_tab_1_label = lv_label_create(ui->screen_main_tabview_tab_1); // lv_label_set_text(screen_main_tabview_tab_1_label, "con1"); // lv_obj_set_scrollbar_mode(ui->screen_main_tabview_tab_1,LV_SCROLLBAR_MODE_OFF);//不显示滚动条 // lv_obj_clear_flag(ui->screen_main_tabview_tab_1, LV_OBJ_FLAG_SCROLLABLE); //止滚动 // //Write codes screen_main_scenescont // ui->screen_main_scenescont = lv_obj_create(ui->screen_main_tabview_tab_1); // 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);//不显示滚动条 // lv_obj_clear_flag(ui->screen_main_scenescont, LV_OBJ_FLAG_SCROLLABLE); // 禁止滚动 // //Write style for screen_main_scenescont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. // lv_obj_set_style_border_color(ui->screen_main_scenescont, lv_color_make(0x00, 0x00, 0x00),LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_border_width(ui->screen_main_scenescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_border_opa(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_color(ui->screen_main_scenescont, lv_color_make(0x00, 0x00, 0x00),LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_bg_opa(ui->screen_main_scenescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_pad_all(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); //Write codes onoffs ui->screen_main_tabview_tab_2 = lv_tabview_add_tab(ui->screen_main_tabview,"onoffs"); // lv_obj_t * screen_main_tabview_tab_2_label = lv_label_create(ui->screen_main_tabview_tab_2); // lv_label_set_text(screen_main_tabview_tab_2_label, "onoff"); lv_obj_set_scrollbar_mode(ui->screen_main_tabview_tab_2,LV_SCROLLBAR_MODE_OFF);//不显示滚动条 lv_obj_clear_flag(ui->screen_main_tabview_tab_2, LV_OBJ_FLAG_SCROLLABLE); //止滚动 // //Write codes screen_main_onoffscont // ui->screen_main_onoffscont = lv_obj_create(ui->screen_main_tabview_tab_2); // 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); // lv_obj_clear_flag(ui->screen_main_onoffscont, LV_OBJ_FLAG_SCROLLABLE); //止滚动 // //Write style for screen_main_onoffscont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. // lv_obj_set_style_border_color(ui->screen_main_onoffscont, lv_color_make(0x00, 0x00, 0x00),LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_border_width(ui->screen_main_onoffscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_border_opa(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_color(ui->screen_main_onoffscont, lv_color_make(0x00, 0x00, 0x00),LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_bg_opa(ui->screen_main_onoffscont, 0, LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_pad_all(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); //选择进入哪个开关界面 //热清切换换的时候直接删除screen_main_onoffscont的所有字对象 在加载新对象 setup_scr_onoff4(ui); //Write codes dimmers ui->screen_main_tabview_tab_3 = lv_tabview_add_tab(ui->screen_main_tabview,"dimmers"); // lv_obj_t * screen_main_tabview_tab_3_label = lv_label_create(ui->screen_main_tabview_tab_3); // lv_label_set_text(screen_main_tabview_tab_3_label, "dimmer"); lv_obj_set_scrollbar_mode(ui->screen_main_tabview_tab_3,LV_SCROLLBAR_MODE_OFF);//不显示滚动条 lv_obj_clear_flag(ui->screen_main_tabview_tab_3, LV_OBJ_FLAG_SCROLLABLE); // 禁止滚动 // //Write codes screen_main_dimmerscont // ui->screen_main_dimmerscont = lv_obj_create(ui->screen_main_tabview_tab_3); // 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, 0, LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_pad_all(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 curtains ui->screen_main_tabview_tab_4 = lv_tabview_add_tab(ui->screen_main_tabview,"curtains"); // lv_obj_t * screen_main_tabview_tab_4_label = lv_label_create(ui->screen_main_tabview_tab_4); // lv_label_set_text(screen_main_tabview_tab_4_label, "curtain"); lv_obj_set_scrollbar_mode(ui->screen_main_tabview_tab_4,LV_SCROLLBAR_MODE_OFF);//不显示滚动条 lv_obj_clear_flag(ui->screen_main_tabview_tab_4, LV_OBJ_FLAG_SCROLLABLE); // 禁止滚动 // //Write codes screen_main_curtainscont // ui->screen_main_curtainscont = lv_obj_create(ui->screen_main_tabview_tab_4); // 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, 0, LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_pad_all(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 devices ui->screen_main_tabview_tab_5 = lv_tabview_add_tab(ui->screen_main_tabview,"devices"); // lv_obj_t * screen_main_tabview_tab_5_label = lv_label_create(ui->screen_main_tabview_tab_5); // lv_label_set_text(screen_main_tabview_tab_5_label, "device"); lv_obj_set_scrollbar_mode(ui->screen_main_tabview_tab_5,LV_SCROLLBAR_MODE_OFF);//不显示滚动条 lv_obj_clear_flag(ui->screen_main_tabview_tab_5, LV_OBJ_FLAG_SCROLLABLE); //止滚动 // //Write codes screen_main_devicescont // ui->screen_main_devicescont = lv_obj_create(ui->screen_main_tabview_tab_5); // 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);//不显示滚动条 // lv_obj_clear_flag(ui->screen_main_devicescont, LV_OBJ_FLAG_SCROLLABLE); //止滚动 // //Write style for screen_main_devicescont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. // lv_obj_set_style_border_color(ui->screen_main_devicescont, lv_color_make(0x00, 0x00, 0x00),LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_border_width(ui->screen_main_devicescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_border_opa(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_color(ui->screen_main_devicescont, lv_color_make(0x00, 0x00, 0x00),LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_bg_opa(ui->screen_main_devicescont, 0, LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_pad_all(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); //导航栏放到tabview的最上面 //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_all(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, &_navi_bg_alpha_440x74); 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, "Scenes"); 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_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_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_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_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_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_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_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_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_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); }