307 lines
23 KiB
C
307 lines
23 KiB
C
/*
|
|
* Copyright 2025 NXP
|
|
* NXP 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"
|
|
#include "apps_gather.h"
|
|
|
|
|
|
void setup_scr_screen_setting(lv_ui *ui)
|
|
{
|
|
//Write codes screen_setting
|
|
ui->screen_setting = lv_obj_create(NULL);
|
|
lv_obj_set_size(ui->screen_setting, 320, 240);
|
|
lv_obj_set_scrollbar_mode(ui->screen_setting, LV_SCROLLBAR_MODE_OFF);
|
|
|
|
//Write style for screen_setting, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_bg_opa(ui->screen_setting, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write codes screen_setting_tabview_1
|
|
ui->screen_setting_tabview_1 = lv_tabview_create(ui->screen_setting, LV_DIR_LEFT, 80);
|
|
lv_obj_set_pos(ui->screen_setting_tabview_1, 0, 40);
|
|
lv_obj_set_size(ui->screen_setting_tabview_1, 320, 200);
|
|
lv_obj_set_scrollbar_mode(ui->screen_setting_tabview_1, LV_SCROLLBAR_MODE_OFF);
|
|
|
|
//Write style for screen_setting_tabview_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_bg_opa(ui->screen_setting_tabview_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_color(ui->screen_setting_tabview_1, lv_color_hex(0xeaeff3), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_grad_dir(ui->screen_setting_tabview_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_color(ui->screen_setting_tabview_1, lv_color_hex(0x4d4d4d), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_font(ui->screen_setting_tabview_1, &lv_font_SourceHanSerifSC_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_opa(ui->screen_setting_tabview_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_letter_space(ui->screen_setting_tabview_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_line_space(ui->screen_setting_tabview_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_border_width(ui->screen_setting_tabview_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_setting_tabview_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->screen_setting_tabview_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write style state: LV_STATE_DEFAULT for &style_screen_setting_tabview_1_extra_btnm_main_default
|
|
static lv_style_t style_screen_setting_tabview_1_extra_btnm_main_default;
|
|
ui_init_style(&style_screen_setting_tabview_1_extra_btnm_main_default);
|
|
|
|
lv_style_set_bg_opa(&style_screen_setting_tabview_1_extra_btnm_main_default, 255);
|
|
lv_style_set_bg_color(&style_screen_setting_tabview_1_extra_btnm_main_default, lv_color_hex(0xffffff));
|
|
lv_style_set_bg_grad_dir(&style_screen_setting_tabview_1_extra_btnm_main_default, LV_GRAD_DIR_NONE);
|
|
lv_style_set_border_width(&style_screen_setting_tabview_1_extra_btnm_main_default, 0);
|
|
lv_style_set_radius(&style_screen_setting_tabview_1_extra_btnm_main_default, 0);
|
|
lv_obj_add_style(lv_tabview_get_tab_btns(ui->screen_setting_tabview_1), &style_screen_setting_tabview_1_extra_btnm_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//Write style state: LV_STATE_DEFAULT for &style_screen_setting_tabview_1_extra_btnm_items_default
|
|
static lv_style_t style_screen_setting_tabview_1_extra_btnm_items_default;
|
|
ui_init_style(&style_screen_setting_tabview_1_extra_btnm_items_default);
|
|
|
|
lv_style_set_text_color(&style_screen_setting_tabview_1_extra_btnm_items_default, lv_color_hex(0x4d4d4d));
|
|
lv_style_set_text_font(&style_screen_setting_tabview_1_extra_btnm_items_default, &lv_font_SourceHanSerifSC_Regular_14);
|
|
lv_style_set_text_opa(&style_screen_setting_tabview_1_extra_btnm_items_default, 255);
|
|
lv_obj_add_style(lv_tabview_get_tab_btns(ui->screen_setting_tabview_1), &style_screen_setting_tabview_1_extra_btnm_items_default, LV_PART_ITEMS|LV_STATE_DEFAULT);
|
|
|
|
//Write style state: LV_STATE_CHECKED for &style_screen_setting_tabview_1_extra_btnm_items_checked
|
|
static lv_style_t style_screen_setting_tabview_1_extra_btnm_items_checked;
|
|
ui_init_style(&style_screen_setting_tabview_1_extra_btnm_items_checked);
|
|
|
|
lv_style_set_text_color(&style_screen_setting_tabview_1_extra_btnm_items_checked, lv_color_hex(0x2195f6));
|
|
lv_style_set_text_font(&style_screen_setting_tabview_1_extra_btnm_items_checked, &lv_font_SourceHanSerifSC_Regular_14);
|
|
lv_style_set_text_opa(&style_screen_setting_tabview_1_extra_btnm_items_checked, 255);
|
|
lv_style_set_border_width(&style_screen_setting_tabview_1_extra_btnm_items_checked, 4);
|
|
lv_style_set_border_opa(&style_screen_setting_tabview_1_extra_btnm_items_checked, 255);
|
|
lv_style_set_border_color(&style_screen_setting_tabview_1_extra_btnm_items_checked, lv_color_hex(0x2195f6));
|
|
lv_style_set_border_side(&style_screen_setting_tabview_1_extra_btnm_items_checked, LV_BORDER_SIDE_NONE);
|
|
lv_style_set_radius(&style_screen_setting_tabview_1_extra_btnm_items_checked, 0);
|
|
lv_style_set_bg_opa(&style_screen_setting_tabview_1_extra_btnm_items_checked, 60);
|
|
lv_style_set_bg_color(&style_screen_setting_tabview_1_extra_btnm_items_checked, lv_color_hex(0x2195f6));
|
|
lv_style_set_bg_grad_dir(&style_screen_setting_tabview_1_extra_btnm_items_checked, LV_GRAD_DIR_NONE);
|
|
lv_obj_add_style(lv_tabview_get_tab_btns(ui->screen_setting_tabview_1), &style_screen_setting_tabview_1_extra_btnm_items_checked, LV_PART_ITEMS|LV_STATE_CHECKED);
|
|
|
|
//Write codes 曲线设置
|
|
ui->screen_setting_tabview_1_tab_1 = lv_tabview_add_tab(ui->screen_setting_tabview_1,"曲线设置");
|
|
lv_obj_t * screen_setting_tabview_1_tab_1_label = lv_label_create(ui->screen_setting_tabview_1_tab_1);
|
|
lv_label_set_text(screen_setting_tabview_1_tab_1_label, "电压 上限 下限\n \n电流 上限 下限");
|
|
|
|
//Write codes screen_setting_spangroup_volt_unit
|
|
ui->screen_setting_spangroup_volt_unit = lv_spangroup_create(ui->screen_setting_tabview_1_tab_1);
|
|
lv_spangroup_set_align(ui->screen_setting_spangroup_volt_unit, LV_TEXT_ALIGN_LEFT);
|
|
lv_spangroup_set_overflow(ui->screen_setting_spangroup_volt_unit, LV_SPAN_OVERFLOW_CLIP);
|
|
lv_spangroup_set_mode(ui->screen_setting_spangroup_volt_unit, LV_SPAN_MODE_BREAK);
|
|
//create span
|
|
ui->screen_setting_spangroup_volt_unit_span = lv_spangroup_new_span(ui->screen_setting_spangroup_volt_unit);
|
|
lv_span_set_text(ui->screen_setting_spangroup_volt_unit_span, "V");
|
|
lv_style_set_text_color(&ui->screen_setting_spangroup_volt_unit_span->style, lv_color_hex(0x000000));
|
|
lv_style_set_text_decor(&ui->screen_setting_spangroup_volt_unit_span->style, LV_TEXT_DECOR_NONE);
|
|
lv_style_set_text_font(&ui->screen_setting_spangroup_volt_unit_span->style, &lv_font_montserratMedium_12);
|
|
lv_obj_set_pos(ui->screen_setting_spangroup_volt_unit, 40, 2);
|
|
lv_obj_set_size(ui->screen_setting_spangroup_volt_unit, 26, 14);
|
|
|
|
//Write style state: LV_STATE_DEFAULT for &style_screen_setting_spangroup_volt_unit_main_main_default
|
|
static lv_style_t style_screen_setting_spangroup_volt_unit_main_main_default;
|
|
ui_init_style(&style_screen_setting_spangroup_volt_unit_main_main_default);
|
|
|
|
lv_style_set_border_width(&style_screen_setting_spangroup_volt_unit_main_main_default, 0);
|
|
lv_style_set_radius(&style_screen_setting_spangroup_volt_unit_main_main_default, 0);
|
|
lv_style_set_bg_opa(&style_screen_setting_spangroup_volt_unit_main_main_default, 255);
|
|
lv_style_set_bg_color(&style_screen_setting_spangroup_volt_unit_main_main_default, lv_color_hex(0x99c2e5));
|
|
lv_style_set_bg_grad_dir(&style_screen_setting_spangroup_volt_unit_main_main_default, LV_GRAD_DIR_NONE);
|
|
lv_style_set_pad_top(&style_screen_setting_spangroup_volt_unit_main_main_default, 0);
|
|
lv_style_set_pad_right(&style_screen_setting_spangroup_volt_unit_main_main_default, 0);
|
|
lv_style_set_pad_bottom(&style_screen_setting_spangroup_volt_unit_main_main_default, 0);
|
|
lv_style_set_pad_left(&style_screen_setting_spangroup_volt_unit_main_main_default, 0);
|
|
lv_style_set_shadow_width(&style_screen_setting_spangroup_volt_unit_main_main_default, 0);
|
|
lv_obj_add_style(ui->screen_setting_spangroup_volt_unit, &style_screen_setting_spangroup_volt_unit_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_spangroup_refr_mode(ui->screen_setting_spangroup_volt_unit);
|
|
|
|
//Write codes screen_setting_spangroup_volt_low
|
|
ui->screen_setting_spangroup_volt_low = lv_spangroup_create(ui->screen_setting_tabview_1_tab_1);
|
|
lv_spangroup_set_align(ui->screen_setting_spangroup_volt_low, LV_TEXT_ALIGN_LEFT);
|
|
lv_spangroup_set_overflow(ui->screen_setting_spangroup_volt_low, LV_SPAN_OVERFLOW_CLIP);
|
|
lv_spangroup_set_mode(ui->screen_setting_spangroup_volt_low, LV_SPAN_MODE_BREAK);
|
|
//create span
|
|
ui->screen_setting_spangroup_volt_low_span = lv_spangroup_new_span(ui->screen_setting_spangroup_volt_low);
|
|
lv_span_set_text(ui->screen_setting_spangroup_volt_low_span, "0");
|
|
lv_style_set_text_color(&ui->screen_setting_spangroup_volt_low_span->style, lv_color_hex(0x000000));
|
|
lv_style_set_text_decor(&ui->screen_setting_spangroup_volt_low_span->style, LV_TEXT_DECOR_NONE);
|
|
lv_style_set_text_font(&ui->screen_setting_spangroup_volt_low_span->style, &lv_font_montserratMedium_12);
|
|
lv_obj_set_pos(ui->screen_setting_spangroup_volt_low, 181, 2);
|
|
lv_obj_set_size(ui->screen_setting_spangroup_volt_low, 26, 14);
|
|
|
|
//Write style state: LV_STATE_DEFAULT for &style_screen_setting_spangroup_volt_low_main_main_default
|
|
static lv_style_t style_screen_setting_spangroup_volt_low_main_main_default;
|
|
ui_init_style(&style_screen_setting_spangroup_volt_low_main_main_default);
|
|
|
|
lv_style_set_border_width(&style_screen_setting_spangroup_volt_low_main_main_default, 0);
|
|
lv_style_set_radius(&style_screen_setting_spangroup_volt_low_main_main_default, 0);
|
|
lv_style_set_bg_opa(&style_screen_setting_spangroup_volt_low_main_main_default, 0);
|
|
lv_style_set_pad_top(&style_screen_setting_spangroup_volt_low_main_main_default, 0);
|
|
lv_style_set_pad_right(&style_screen_setting_spangroup_volt_low_main_main_default, 0);
|
|
lv_style_set_pad_bottom(&style_screen_setting_spangroup_volt_low_main_main_default, 0);
|
|
lv_style_set_pad_left(&style_screen_setting_spangroup_volt_low_main_main_default, 0);
|
|
lv_style_set_shadow_width(&style_screen_setting_spangroup_volt_low_main_main_default, 0);
|
|
lv_obj_add_style(ui->screen_setting_spangroup_volt_low, &style_screen_setting_spangroup_volt_low_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_spangroup_refr_mode(ui->screen_setting_spangroup_volt_low);
|
|
|
|
//Write codes screen_setting_spangroup_volt_high
|
|
ui->screen_setting_spangroup_volt_high = lv_spangroup_create(ui->screen_setting_tabview_1_tab_1);
|
|
lv_spangroup_set_align(ui->screen_setting_spangroup_volt_high, LV_TEXT_ALIGN_LEFT);
|
|
lv_spangroup_set_overflow(ui->screen_setting_spangroup_volt_high, LV_SPAN_OVERFLOW_CLIP);
|
|
lv_spangroup_set_mode(ui->screen_setting_spangroup_volt_high, LV_SPAN_MODE_BREAK);
|
|
//create span
|
|
ui->screen_setting_spangroup_volt_high_span = lv_spangroup_new_span(ui->screen_setting_spangroup_volt_high);
|
|
lv_span_set_text(ui->screen_setting_spangroup_volt_high_span, "30");
|
|
lv_style_set_text_color(&ui->screen_setting_spangroup_volt_high_span->style, lv_color_hex(0x000000));
|
|
lv_style_set_text_decor(&ui->screen_setting_spangroup_volt_high_span->style, LV_TEXT_DECOR_NONE);
|
|
lv_style_set_text_font(&ui->screen_setting_spangroup_volt_high_span->style, &lv_font_montserratMedium_12);
|
|
lv_obj_set_pos(ui->screen_setting_spangroup_volt_high, 107, 2);
|
|
lv_obj_set_size(ui->screen_setting_spangroup_volt_high, 26, 14);
|
|
|
|
//Write style state: LV_STATE_DEFAULT for &style_screen_setting_spangroup_volt_high_main_main_default
|
|
static lv_style_t style_screen_setting_spangroup_volt_high_main_main_default;
|
|
ui_init_style(&style_screen_setting_spangroup_volt_high_main_main_default);
|
|
|
|
lv_style_set_border_width(&style_screen_setting_spangroup_volt_high_main_main_default, 0);
|
|
lv_style_set_radius(&style_screen_setting_spangroup_volt_high_main_main_default, 0);
|
|
lv_style_set_bg_opa(&style_screen_setting_spangroup_volt_high_main_main_default, 0);
|
|
lv_style_set_pad_top(&style_screen_setting_spangroup_volt_high_main_main_default, 0);
|
|
lv_style_set_pad_right(&style_screen_setting_spangroup_volt_high_main_main_default, 0);
|
|
lv_style_set_pad_bottom(&style_screen_setting_spangroup_volt_high_main_main_default, 0);
|
|
lv_style_set_pad_left(&style_screen_setting_spangroup_volt_high_main_main_default, 0);
|
|
lv_style_set_shadow_width(&style_screen_setting_spangroup_volt_high_main_main_default, 0);
|
|
lv_obj_add_style(ui->screen_setting_spangroup_volt_high, &style_screen_setting_spangroup_volt_high_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_spangroup_refr_mode(ui->screen_setting_spangroup_volt_high);
|
|
|
|
//Write codes screen_setting_spangroup_current_unit
|
|
ui->screen_setting_spangroup_current_unit = lv_spangroup_create(ui->screen_setting_tabview_1_tab_1);
|
|
lv_spangroup_set_align(ui->screen_setting_spangroup_current_unit, LV_TEXT_ALIGN_LEFT);
|
|
lv_spangroup_set_overflow(ui->screen_setting_spangroup_current_unit, LV_SPAN_OVERFLOW_CLIP);
|
|
lv_spangroup_set_mode(ui->screen_setting_spangroup_current_unit, LV_SPAN_MODE_BREAK);
|
|
//create span
|
|
ui->screen_setting_spangroup_current_unit_span = lv_spangroup_new_span(ui->screen_setting_spangroup_current_unit);
|
|
lv_span_set_text(ui->screen_setting_spangroup_current_unit_span, "mA");
|
|
lv_style_set_text_color(&ui->screen_setting_spangroup_current_unit_span->style, lv_color_hex(0x000000));
|
|
lv_style_set_text_decor(&ui->screen_setting_spangroup_current_unit_span->style, LV_TEXT_DECOR_NONE);
|
|
lv_style_set_text_font(&ui->screen_setting_spangroup_current_unit_span->style, &lv_font_montserratMedium_12);
|
|
lv_obj_set_pos(ui->screen_setting_spangroup_current_unit, 40, 34);
|
|
lv_obj_set_size(ui->screen_setting_spangroup_current_unit, 26, 14);
|
|
|
|
//Write style state: LV_STATE_DEFAULT for &style_screen_setting_spangroup_current_unit_main_main_default
|
|
static lv_style_t style_screen_setting_spangroup_current_unit_main_main_default;
|
|
ui_init_style(&style_screen_setting_spangroup_current_unit_main_main_default);
|
|
|
|
lv_style_set_border_width(&style_screen_setting_spangroup_current_unit_main_main_default, 0);
|
|
lv_style_set_radius(&style_screen_setting_spangroup_current_unit_main_main_default, 0);
|
|
lv_style_set_bg_opa(&style_screen_setting_spangroup_current_unit_main_main_default, 0);
|
|
lv_style_set_pad_top(&style_screen_setting_spangroup_current_unit_main_main_default, 0);
|
|
lv_style_set_pad_right(&style_screen_setting_spangroup_current_unit_main_main_default, 0);
|
|
lv_style_set_pad_bottom(&style_screen_setting_spangroup_current_unit_main_main_default, 0);
|
|
lv_style_set_pad_left(&style_screen_setting_spangroup_current_unit_main_main_default, 0);
|
|
lv_style_set_shadow_width(&style_screen_setting_spangroup_current_unit_main_main_default, 0);
|
|
lv_obj_add_style(ui->screen_setting_spangroup_current_unit, &style_screen_setting_spangroup_current_unit_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_spangroup_refr_mode(ui->screen_setting_spangroup_current_unit);
|
|
|
|
//Write codes screen_setting_spangroup_current_high
|
|
ui->screen_setting_spangroup_current_high = lv_spangroup_create(ui->screen_setting_tabview_1_tab_1);
|
|
lv_spangroup_set_align(ui->screen_setting_spangroup_current_high, LV_TEXT_ALIGN_LEFT);
|
|
lv_spangroup_set_overflow(ui->screen_setting_spangroup_current_high, LV_SPAN_OVERFLOW_CLIP);
|
|
lv_spangroup_set_mode(ui->screen_setting_spangroup_current_high, LV_SPAN_MODE_BREAK);
|
|
//create span
|
|
ui->screen_setting_spangroup_current_high_span = lv_spangroup_new_span(ui->screen_setting_spangroup_current_high);
|
|
lv_span_set_text(ui->screen_setting_spangroup_current_high_span, "30");
|
|
lv_style_set_text_color(&ui->screen_setting_spangroup_current_high_span->style, lv_color_hex(0x000000));
|
|
lv_style_set_text_decor(&ui->screen_setting_spangroup_current_high_span->style, LV_TEXT_DECOR_NONE);
|
|
lv_style_set_text_font(&ui->screen_setting_spangroup_current_high_span->style, &lv_font_montserratMedium_12);
|
|
lv_obj_set_pos(ui->screen_setting_spangroup_current_high, 107, 34);
|
|
lv_obj_set_size(ui->screen_setting_spangroup_current_high, 26, 14);
|
|
|
|
//Write style state: LV_STATE_DEFAULT for &style_screen_setting_spangroup_current_high_main_main_default
|
|
static lv_style_t style_screen_setting_spangroup_current_high_main_main_default;
|
|
ui_init_style(&style_screen_setting_spangroup_current_high_main_main_default);
|
|
|
|
lv_style_set_border_width(&style_screen_setting_spangroup_current_high_main_main_default, 0);
|
|
lv_style_set_radius(&style_screen_setting_spangroup_current_high_main_main_default, 0);
|
|
lv_style_set_bg_opa(&style_screen_setting_spangroup_current_high_main_main_default, 0);
|
|
lv_style_set_pad_top(&style_screen_setting_spangroup_current_high_main_main_default, 0);
|
|
lv_style_set_pad_right(&style_screen_setting_spangroup_current_high_main_main_default, 0);
|
|
lv_style_set_pad_bottom(&style_screen_setting_spangroup_current_high_main_main_default, 0);
|
|
lv_style_set_pad_left(&style_screen_setting_spangroup_current_high_main_main_default, 0);
|
|
lv_style_set_shadow_width(&style_screen_setting_spangroup_current_high_main_main_default, 0);
|
|
lv_obj_add_style(ui->screen_setting_spangroup_current_high, &style_screen_setting_spangroup_current_high_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_spangroup_refr_mode(ui->screen_setting_spangroup_current_high);
|
|
|
|
//Write codes screen_setting_spangroup_current_low
|
|
ui->screen_setting_spangroup_current_low = lv_spangroup_create(ui->screen_setting_tabview_1_tab_1);
|
|
lv_spangroup_set_align(ui->screen_setting_spangroup_current_low, LV_TEXT_ALIGN_LEFT);
|
|
lv_spangroup_set_overflow(ui->screen_setting_spangroup_current_low, LV_SPAN_OVERFLOW_CLIP);
|
|
lv_spangroup_set_mode(ui->screen_setting_spangroup_current_low, LV_SPAN_MODE_BREAK);
|
|
//create span
|
|
ui->screen_setting_spangroup_current_low_span = lv_spangroup_new_span(ui->screen_setting_spangroup_current_low);
|
|
lv_span_set_text(ui->screen_setting_spangroup_current_low_span, "0");
|
|
lv_style_set_text_color(&ui->screen_setting_spangroup_current_low_span->style, lv_color_hex(0x000000));
|
|
lv_style_set_text_decor(&ui->screen_setting_spangroup_current_low_span->style, LV_TEXT_DECOR_NONE);
|
|
lv_style_set_text_font(&ui->screen_setting_spangroup_current_low_span->style, &lv_font_montserratMedium_12);
|
|
lv_obj_set_pos(ui->screen_setting_spangroup_current_low, 180, 34);
|
|
lv_obj_set_size(ui->screen_setting_spangroup_current_low, 26, 14);
|
|
|
|
//Write style state: LV_STATE_DEFAULT for &style_screen_setting_spangroup_current_low_main_main_default
|
|
static lv_style_t style_screen_setting_spangroup_current_low_main_main_default;
|
|
ui_init_style(&style_screen_setting_spangroup_current_low_main_main_default);
|
|
|
|
lv_style_set_border_width(&style_screen_setting_spangroup_current_low_main_main_default, 0);
|
|
lv_style_set_radius(&style_screen_setting_spangroup_current_low_main_main_default, 0);
|
|
lv_style_set_bg_opa(&style_screen_setting_spangroup_current_low_main_main_default, 0);
|
|
lv_style_set_pad_top(&style_screen_setting_spangroup_current_low_main_main_default, 0);
|
|
lv_style_set_pad_right(&style_screen_setting_spangroup_current_low_main_main_default, 0);
|
|
lv_style_set_pad_bottom(&style_screen_setting_spangroup_current_low_main_main_default, 0);
|
|
lv_style_set_pad_left(&style_screen_setting_spangroup_current_low_main_main_default, 0);
|
|
lv_style_set_shadow_width(&style_screen_setting_spangroup_current_low_main_main_default, 0);
|
|
lv_obj_add_style(ui->screen_setting_spangroup_current_low, &style_screen_setting_spangroup_current_low_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_spangroup_refr_mode(ui->screen_setting_spangroup_current_low);
|
|
|
|
//Write codes tab
|
|
ui->screen_setting_tabview_1_tab_2 = lv_tabview_add_tab(ui->screen_setting_tabview_1,"tab");
|
|
lv_obj_t * screen_setting_tabview_1_tab_2_label = lv_label_create(ui->screen_setting_tabview_1_tab_2);
|
|
lv_label_set_text(screen_setting_tabview_1_tab_2_label, "con2");
|
|
|
|
//Write codes tab
|
|
ui->screen_setting_tabview_1_tab_3 = lv_tabview_add_tab(ui->screen_setting_tabview_1,"tab");
|
|
lv_obj_t * screen_setting_tabview_1_tab_3_label = lv_label_create(ui->screen_setting_tabview_1_tab_3);
|
|
lv_label_set_text(screen_setting_tabview_1_tab_3_label, "con3");
|
|
|
|
//Write codes screen_setting_label_1
|
|
ui->screen_setting_label_1 = lv_label_create(ui->screen_setting);
|
|
lv_label_set_text(ui->screen_setting_label_1, "详细设置");
|
|
lv_label_set_long_mode(ui->screen_setting_label_1, LV_LABEL_LONG_WRAP);
|
|
lv_obj_set_pos(ui->screen_setting_label_1, 0, 0);
|
|
lv_obj_set_size(ui->screen_setting_label_1, 320, 40);
|
|
|
|
//Write style for screen_setting_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
|
lv_obj_set_style_border_width(ui->screen_setting_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_radius(ui->screen_setting_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_color(ui->screen_setting_label_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_font(ui->screen_setting_label_1, &lv_font_SourceHanSerifSC_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_opa(ui->screen_setting_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_letter_space(ui->screen_setting_label_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_line_space(ui->screen_setting_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_text_align(ui->screen_setting_label_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_opa(ui->screen_setting_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_color(ui->screen_setting_label_1, lv_color_hex(0x75d4ff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_bg_grad_dir(ui->screen_setting_label_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_top(ui->screen_setting_label_1, 12, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_right(ui->screen_setting_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_bottom(ui->screen_setting_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_left(ui->screen_setting_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
lv_obj_set_style_shadow_width(ui->screen_setting_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
|
|
//The custom code of screen_setting.
|
|
|
|
//Update current screen layout.
|
|
lv_obj_update_layout(ui->screen_setting);
|
|
|
|
}
|