Files
luban-lite-t3e-pro/application/rt-thread/t3e-pro/components/generated/setup_scr_relayinfopage.c
2025-09-30 11:56:06 +08:00

100 lines
5.6 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_relayinfopage(lv_ui *ui)
{
//Write codes relayinfopage
ui->relayinfopage = lv_obj_create(NULL);
lv_obj_set_size(ui->relayinfopage, 480, 480);
lv_obj_set_scrollbar_mode(ui->relayinfopage, LV_SCROLLBAR_MODE_OFF);
//Write style for relayinfopage, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->relayinfopage, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->relayinfopage, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->relayinfopage, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes relayinfopage_returnbg
ui->relayinfopage_returnbg = lv_img_create(ui->relayinfopage);
lv_obj_add_flag(ui->relayinfopage_returnbg, LV_OBJ_FLAG_CLICKABLE);
lv_img_set_src(ui->relayinfopage_returnbg, LVGL_PATH(returnbg.png));
lv_img_set_pivot(ui->relayinfopage_returnbg, 50,50);
lv_img_set_angle(ui->relayinfopage_returnbg, 0);
lv_obj_set_pos(ui->relayinfopage_returnbg, 23, 27);
lv_obj_set_size(ui->relayinfopage_returnbg, 14, 26);
//Write style for relayinfopage_returnbg, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_img_opa(ui->relayinfopage_returnbg, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes relayinfopage_retrunbtn
ui->relayinfopage_retrunbtn = lv_btn_create(ui->relayinfopage);
//ui->relayinfopage_retrunbtn_label = lv_label_create(ui->relayinfopage_retrunbtn);
//lv_label_set_text(ui->relayinfopage_retrunbtn_label, "");
//lv_label_set_long_mode(ui->relayinfopage_retrunbtn_label, LV_LABEL_LONG_WRAP);
//lv_obj_align(ui->relayinfopage_retrunbtn_label, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_pad_all(ui->relayinfopage_retrunbtn, 0, LV_STATE_DEFAULT);
//lv_obj_set_width(ui->relayinfopage_retrunbtn_label, LV_PCT(100));
lv_obj_set_pos(ui->relayinfopage_retrunbtn, 8, 8);
lv_obj_set_size(ui->relayinfopage_retrunbtn, 60, 60);
//Write style for relayinfopage_retrunbtn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->relayinfopage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->relayinfopage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->relayinfopage_retrunbtn, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->relayinfopage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_color(ui->relayinfopage_retrunbtn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_font(ui->relayinfopage_retrunbtn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_opa(ui->relayinfopage_retrunbtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
// lv_obj_set_style_text_align(ui->relayinfopage_retrunbtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes relayinfopage_label_1
ui->relayinfopage_label_1 = lv_label_create(ui->relayinfopage);
//lv_label_set_text(ui->relayinfopage_label_1, "Relay select");
lv_label_set_text(ui->relayinfopage_label_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetRelay]);
lv_label_set_long_mode(ui->relayinfopage_label_1, LV_LABEL_LONG_DOT);
lv_obj_set_pos(ui->relayinfopage_label_1, 46, 32);
lv_obj_set_size(ui->relayinfopage_label_1, 200, 20);
//Write style for relayinfopage_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->relayinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->relayinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->relayinfopage_label_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->relayinfopage_label_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->relayinfopage_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_letter_space(ui->relayinfopage_label_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_line_space(ui->relayinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->relayinfopage_label_1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->relayinfopage_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->relayinfopage_label_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->relayinfopage_label_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->relayinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->relayinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->relayinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->relayinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->relayinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//The custom code of relayinfopage.
//Update current screen layout.
lv_obj_update_layout(ui->relayinfopage);
//Init events for screen.
events_init_relayinfopage(ui);
}