sggt/LVGL/myGUI/generated/setup_scr_screen_main.c

308 lines
21 KiB
C

/*
* Copyright 2024 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"
void setup_scr_screen_main(lv_ui *ui)
{
//Write codes screen_main
ui->screen_main = lv_obj_create(NULL);
lv_obj_set_size(ui->screen_main, 320, 240);
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(0xffffff), 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_1
ui->screen_main_tabview_1 = lv_tabview_create(ui->screen_main, LV_DIR_BOTTOM, 30);
lv_obj_set_pos(ui->screen_main_tabview_1, 0, 1);
lv_obj_set_size(ui->screen_main_tabview_1, 320, 240);
lv_obj_set_scrollbar_mode(ui->screen_main_tabview_1, LV_SCROLLBAR_MODE_OFF);
//Write style for screen_main_tabview_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->screen_main_tabview_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->screen_main_tabview_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->screen_main_tabview_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->screen_main_tabview_1, lv_color_hex(0x4d4d4d), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->screen_main_tabview_1, &lv_font_SourceHanSerifSC_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->screen_main_tabview_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_letter_space(ui->screen_main_tabview_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_line_space(ui->screen_main_tabview_1, 16, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->screen_main_tabview_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->screen_main_tabview_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->screen_main_tabview_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style state: LV_STATE_DEFAULT for &style_screen_main_tabview_1_extra_btnm_main_default
static lv_style_t style_screen_main_tabview_1_extra_btnm_main_default;
ui_init_style(&style_screen_main_tabview_1_extra_btnm_main_default);
lv_style_set_bg_opa(&style_screen_main_tabview_1_extra_btnm_main_default, 34);
lv_style_set_bg_color(&style_screen_main_tabview_1_extra_btnm_main_default, lv_color_hex(0x359bd7));
lv_style_set_bg_grad_dir(&style_screen_main_tabview_1_extra_btnm_main_default, LV_GRAD_DIR_NONE);
lv_style_set_border_width(&style_screen_main_tabview_1_extra_btnm_main_default, 0);
lv_style_set_radius(&style_screen_main_tabview_1_extra_btnm_main_default, 0);
lv_obj_add_style(lv_tabview_get_tab_btns(ui->screen_main_tabview_1), &style_screen_main_tabview_1_extra_btnm_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style state: LV_STATE_DEFAULT for &style_screen_main_tabview_1_extra_btnm_items_default
static lv_style_t style_screen_main_tabview_1_extra_btnm_items_default;
ui_init_style(&style_screen_main_tabview_1_extra_btnm_items_default);
lv_style_set_text_color(&style_screen_main_tabview_1_extra_btnm_items_default, lv_color_hex(0x4d4d4d));
lv_style_set_text_font(&style_screen_main_tabview_1_extra_btnm_items_default, &lv_font_SourceHanSerifSC_Regular_12);
lv_style_set_text_opa(&style_screen_main_tabview_1_extra_btnm_items_default, 255);
lv_obj_add_style(lv_tabview_get_tab_btns(ui->screen_main_tabview_1), &style_screen_main_tabview_1_extra_btnm_items_default, LV_PART_ITEMS|LV_STATE_DEFAULT);
//Write style state: LV_STATE_CHECKED for &style_screen_main_tabview_1_extra_btnm_items_checked
static lv_style_t style_screen_main_tabview_1_extra_btnm_items_checked;
ui_init_style(&style_screen_main_tabview_1_extra_btnm_items_checked);
lv_style_set_text_color(&style_screen_main_tabview_1_extra_btnm_items_checked, lv_color_hex(0x2195f6));
lv_style_set_text_font(&style_screen_main_tabview_1_extra_btnm_items_checked, &lv_font_SourceHanSerifSC_Regular_12);
lv_style_set_text_opa(&style_screen_main_tabview_1_extra_btnm_items_checked, 255);
lv_style_set_border_width(&style_screen_main_tabview_1_extra_btnm_items_checked, 4);
lv_style_set_border_opa(&style_screen_main_tabview_1_extra_btnm_items_checked, 255);
lv_style_set_border_color(&style_screen_main_tabview_1_extra_btnm_items_checked, lv_color_hex(0x2195f6));
lv_style_set_border_side(&style_screen_main_tabview_1_extra_btnm_items_checked, LV_BORDER_SIDE_BOTTOM);
lv_style_set_radius(&style_screen_main_tabview_1_extra_btnm_items_checked, 0);
lv_style_set_bg_opa(&style_screen_main_tabview_1_extra_btnm_items_checked, 60);
lv_style_set_bg_color(&style_screen_main_tabview_1_extra_btnm_items_checked, lv_color_hex(0x2195f6));
lv_style_set_bg_grad_dir(&style_screen_main_tabview_1_extra_btnm_items_checked, LV_GRAD_DIR_NONE);
lv_obj_add_style(lv_tabview_get_tab_btns(ui->screen_main_tabview_1), &style_screen_main_tabview_1_extra_btnm_items_checked, LV_PART_ITEMS|LV_STATE_CHECKED);
//Write codes 运行
ui->screen_main_tabview_1_tab_1 = lv_tabview_add_tab(ui->screen_main_tabview_1,"运行");
lv_obj_t * screen_main_tabview_1_tab_1_label = lv_label_create(ui->screen_main_tabview_1_tab_1);
lv_label_set_text(screen_main_tabview_1_tab_1_label, "");
//Write codes 暂停
ui->screen_main_tabview_1_tab_2 = lv_tabview_add_tab(ui->screen_main_tabview_1,"暂停");
lv_obj_t * screen_main_tabview_1_tab_2_label = lv_label_create(ui->screen_main_tabview_1_tab_2);
lv_label_set_text(screen_main_tabview_1_tab_2_label, "");
//Write codes 打印
ui->screen_main_tabview_1_tab_3 = lv_tabview_add_tab(ui->screen_main_tabview_1,"打印");
lv_obj_t * screen_main_tabview_1_tab_3_label = lv_label_create(ui->screen_main_tabview_1_tab_3);
lv_label_set_text(screen_main_tabview_1_tab_3_label, "");
//Write codes 设置
ui->screen_main_tabview_1_tab_4 = lv_tabview_add_tab(ui->screen_main_tabview_1,"设置");
lv_obj_t * screen_main_tabview_1_tab_4_label = lv_label_create(ui->screen_main_tabview_1_tab_4);
lv_label_set_text(screen_main_tabview_1_tab_4_label, "");
//Write codes screen_main_animimg_1
ui->screen_main_animimg_1 = lv_animimg_create(ui->screen_main);
lv_animimg_set_src(ui->screen_main_animimg_1, (const void **) screen_main_animimg_1_imgs, 6);
lv_animimg_set_duration(ui->screen_main_animimg_1, 30*6);
lv_animimg_set_repeat_count(ui->screen_main_animimg_1, 0);
lv_img_set_src(ui->screen_main_animimg_1, screen_main_animimg_1_imgs[0]);
lv_obj_set_pos(ui->screen_main_animimg_1, 280, 0);
lv_obj_set_size(ui->screen_main_animimg_1, 40, 25);
//Write codes screen_main_spangroup_4
ui->screen_main_spangroup_4 = lv_spangroup_create(ui->screen_main);
lv_spangroup_set_align(ui->screen_main_spangroup_4, LV_TEXT_ALIGN_LEFT);
lv_spangroup_set_overflow(ui->screen_main_spangroup_4, LV_SPAN_OVERFLOW_CLIP);
lv_spangroup_set_mode(ui->screen_main_spangroup_4, LV_SPAN_MODE_BREAK);
//create span
ui->screen_main_spangroup_4_span = lv_spangroup_new_span(ui->screen_main_spangroup_4);
lv_span_set_text(ui->screen_main_spangroup_4_span, "输出");
lv_style_set_text_color(&ui->screen_main_spangroup_4_span->style, lv_color_hex(0x000000));
lv_style_set_text_decor(&ui->screen_main_spangroup_4_span->style, LV_TEXT_DECOR_NONE);
lv_style_set_text_font(&ui->screen_main_spangroup_4_span->style, &lv_font_SourceHanSerifSC_Regular_24);
lv_obj_set_pos(ui->screen_main_spangroup_4, 225, 178);
lv_obj_set_size(ui->screen_main_spangroup_4, 60, 30);
//Write style state: LV_STATE_DEFAULT for &style_screen_main_spangroup_4_main_main_default
static lv_style_t style_screen_main_spangroup_4_main_main_default;
ui_init_style(&style_screen_main_spangroup_4_main_main_default);
lv_style_set_border_width(&style_screen_main_spangroup_4_main_main_default, 0);
lv_style_set_radius(&style_screen_main_spangroup_4_main_main_default, 0);
lv_style_set_bg_opa(&style_screen_main_spangroup_4_main_main_default, 0);
lv_style_set_pad_top(&style_screen_main_spangroup_4_main_main_default, 0);
lv_style_set_pad_right(&style_screen_main_spangroup_4_main_main_default, 0);
lv_style_set_pad_bottom(&style_screen_main_spangroup_4_main_main_default, 0);
lv_style_set_pad_left(&style_screen_main_spangroup_4_main_main_default, 0);
lv_style_set_shadow_width(&style_screen_main_spangroup_4_main_main_default, 0);
lv_obj_add_style(ui->screen_main_spangroup_4, &style_screen_main_spangroup_4_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_spangroup_refr_mode(ui->screen_main_spangroup_4);
//Write codes screen_main_spangroup_3
ui->screen_main_spangroup_3 = lv_spangroup_create(ui->screen_main);
lv_spangroup_set_align(ui->screen_main_spangroup_3, LV_TEXT_ALIGN_LEFT);
lv_spangroup_set_overflow(ui->screen_main_spangroup_3, LV_SPAN_OVERFLOW_CLIP);
lv_spangroup_set_mode(ui->screen_main_spangroup_3, LV_SPAN_MODE_BREAK);
//create span
ui->screen_main_spangroup_3_span = lv_spangroup_new_span(ui->screen_main_spangroup_3);
lv_span_set_text(ui->screen_main_spangroup_3_span, "mV");
lv_style_set_text_color(&ui->screen_main_spangroup_3_span->style, lv_color_hex(0x000000));
lv_style_set_text_decor(&ui->screen_main_spangroup_3_span->style, LV_TEXT_DECOR_NONE);
lv_style_set_text_font(&ui->screen_main_spangroup_3_span->style, &lv_font_montserratMedium_24);
lv_obj_set_pos(ui->screen_main_spangroup_3, 150, 180);
lv_obj_set_size(ui->screen_main_spangroup_3, 48, 23);
//Write style state: LV_STATE_DEFAULT for &style_screen_main_spangroup_3_main_main_default
static lv_style_t style_screen_main_spangroup_3_main_main_default;
ui_init_style(&style_screen_main_spangroup_3_main_main_default);
lv_style_set_border_width(&style_screen_main_spangroup_3_main_main_default, 0);
lv_style_set_radius(&style_screen_main_spangroup_3_main_main_default, 0);
lv_style_set_bg_opa(&style_screen_main_spangroup_3_main_main_default, 0);
lv_style_set_pad_top(&style_screen_main_spangroup_3_main_main_default, 0);
lv_style_set_pad_right(&style_screen_main_spangroup_3_main_main_default, 0);
lv_style_set_pad_bottom(&style_screen_main_spangroup_3_main_main_default, 0);
lv_style_set_pad_left(&style_screen_main_spangroup_3_main_main_default, 0);
lv_style_set_shadow_width(&style_screen_main_spangroup_3_main_main_default, 0);
lv_obj_add_style(ui->screen_main_spangroup_3, &style_screen_main_spangroup_3_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_spangroup_refr_mode(ui->screen_main_spangroup_3);
//Write codes screen_main_spangroup_2
ui->screen_main_spangroup_2 = lv_spangroup_create(ui->screen_main);
lv_spangroup_set_align(ui->screen_main_spangroup_2, LV_TEXT_ALIGN_LEFT);
lv_spangroup_set_overflow(ui->screen_main_spangroup_2, LV_SPAN_OVERFLOW_CLIP);
lv_spangroup_set_mode(ui->screen_main_spangroup_2, LV_SPAN_MODE_BREAK);
//create span
ui->screen_main_spangroup_2_span = lv_spangroup_new_span(ui->screen_main_spangroup_2);
lv_span_set_text(ui->screen_main_spangroup_2_span, "000.000");
lv_style_set_text_color(&ui->screen_main_spangroup_2_span->style, lv_color_hex(0x000000));
lv_style_set_text_decor(&ui->screen_main_spangroup_2_span->style, LV_TEXT_DECOR_NONE);
lv_style_set_text_font(&ui->screen_main_spangroup_2_span->style, &lv_font_montserratMedium_24);
lv_obj_set_pos(ui->screen_main_spangroup_2, 40, 180);
lv_obj_set_size(ui->screen_main_spangroup_2, 110, 23);
//Write style state: LV_STATE_DEFAULT for &style_screen_main_spangroup_2_main_main_default
static lv_style_t style_screen_main_spangroup_2_main_main_default;
ui_init_style(&style_screen_main_spangroup_2_main_main_default);
lv_style_set_border_width(&style_screen_main_spangroup_2_main_main_default, 0);
lv_style_set_radius(&style_screen_main_spangroup_2_main_main_default, 0);
lv_style_set_bg_opa(&style_screen_main_spangroup_2_main_main_default, 0);
lv_style_set_pad_top(&style_screen_main_spangroup_2_main_main_default, 0);
lv_style_set_pad_right(&style_screen_main_spangroup_2_main_main_default, 0);
lv_style_set_pad_bottom(&style_screen_main_spangroup_2_main_main_default, 0);
lv_style_set_pad_left(&style_screen_main_spangroup_2_main_main_default, 0);
lv_style_set_shadow_width(&style_screen_main_spangroup_2_main_main_default, 0);
lv_obj_add_style(ui->screen_main_spangroup_2, &style_screen_main_spangroup_2_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_spangroup_refr_mode(ui->screen_main_spangroup_2);
//Write codes screen_main_label_1
ui->screen_main_label_1 = lv_label_create(ui->screen_main);
lv_label_set_text(ui->screen_main_label_1, "运行时间");
lv_label_set_long_mode(ui->screen_main_label_1, LV_LABEL_LONG_WRAP);
lv_obj_set_pos(ui->screen_main_label_1, 3, 7);
lv_obj_set_size(ui->screen_main_label_1, 77, 16);
//Write style for screen_main_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_border_width(ui->screen_main_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->screen_main_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui->screen_main_label_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->screen_main_label_1, &lv_font_SourceHanSerifSC_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->screen_main_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_letter_space(ui->screen_main_label_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_line_space(ui->screen_main_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_text_align(ui->screen_main_label_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui->screen_main_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(ui->screen_main_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->screen_main_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(ui->screen_main_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->screen_main_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->screen_main_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes screen_main_chart_1
ui->screen_main_chart_1 = lv_chart_create(ui->screen_main);
lv_chart_set_type(ui->screen_main_chart_1, LV_CHART_TYPE_LINE);
lv_chart_set_div_line_count(ui->screen_main_chart_1, 3, 5);
lv_chart_set_point_count(ui->screen_main_chart_1, 5);
lv_chart_set_range(ui->screen_main_chart_1, LV_CHART_AXIS_PRIMARY_Y, 0, 100);
lv_chart_set_axis_tick(ui->screen_main_chart_1, LV_CHART_AXIS_PRIMARY_Y, 10, 5, 5, 4, false, 40);
lv_chart_set_range(ui->screen_main_chart_1, LV_CHART_AXIS_SECONDARY_Y, 0, 100);
lv_chart_set_axis_tick(ui->screen_main_chart_1, LV_CHART_AXIS_SECONDARY_Y, 10, 5, 5, 4, false, 40);
lv_chart_set_axis_tick(ui->screen_main_chart_1, LV_CHART_AXIS_PRIMARY_X, 10, 5, 5, 4, false, 40);
lv_chart_set_zoom_x(ui->screen_main_chart_1, 256);
lv_chart_set_zoom_y(ui->screen_main_chart_1, 256);
ui->screen_main_chart_1_0 = lv_chart_add_series(ui->screen_main_chart_1, lv_color_hex(0x0063ff), LV_CHART_AXIS_PRIMARY_Y);
#if LV_USE_FREEMASTER == 0
lv_chart_set_next_value(ui->screen_main_chart_1, ui->screen_main_chart_1_0, 1);
lv_chart_set_next_value(ui->screen_main_chart_1, ui->screen_main_chart_1_0, 20);
lv_chart_set_next_value(ui->screen_main_chart_1, ui->screen_main_chart_1_0, 30);
lv_chart_set_next_value(ui->screen_main_chart_1, ui->screen_main_chart_1_0, 40);
lv_chart_set_next_value(ui->screen_main_chart_1, ui->screen_main_chart_1_0, 5);
#endif
lv_obj_set_pos(ui->screen_main_chart_1, 15, 34);
lv_obj_set_size(ui->screen_main_chart_1, 291, 122);
lv_obj_set_scrollbar_mode(ui->screen_main_chart_1, LV_SCROLLBAR_MODE_OFF);
//Write style for screen_main_chart_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->screen_main_chart_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->screen_main_chart_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->screen_main_chart_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_width(ui->screen_main_chart_1, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_opa(ui->screen_main_chart_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_color(ui->screen_main_chart_1, lv_color_hex(0xe8e8e8), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_border_side(ui->screen_main_chart_1, LV_BORDER_SIDE_FULL, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->screen_main_chart_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_line_width(ui->screen_main_chart_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_line_color(ui->screen_main_chart_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_line_opa(ui->screen_main_chart_1, 49, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->screen_main_chart_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write style for screen_main_chart_1, Part: LV_PART_TICKS, State: LV_STATE_DEFAULT.
lv_obj_set_style_text_color(ui->screen_main_chart_1, lv_color_hex(0x151212), LV_PART_TICKS|LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui->screen_main_chart_1, &lv_font_montserratMedium_12, LV_PART_TICKS|LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui->screen_main_chart_1, 255, LV_PART_TICKS|LV_STATE_DEFAULT);
lv_obj_set_style_line_width(ui->screen_main_chart_1, 2, LV_PART_TICKS|LV_STATE_DEFAULT);
lv_obj_set_style_line_color(ui->screen_main_chart_1, lv_color_hex(0x000000), LV_PART_TICKS|LV_STATE_DEFAULT);
lv_obj_set_style_line_opa(ui->screen_main_chart_1, 255, LV_PART_TICKS|LV_STATE_DEFAULT);
//Write codes screen_main_spangroup_1
ui->screen_main_spangroup_1 = lv_spangroup_create(ui->screen_main);
lv_spangroup_set_align(ui->screen_main_spangroup_1, LV_TEXT_ALIGN_LEFT);
lv_spangroup_set_overflow(ui->screen_main_spangroup_1, LV_SPAN_OVERFLOW_CLIP);
lv_spangroup_set_mode(ui->screen_main_spangroup_1, LV_SPAN_MODE_BREAK);
//create span
ui->screen_main_spangroup_1_span = lv_spangroup_new_span(ui->screen_main_spangroup_1);
lv_span_set_text(ui->screen_main_spangroup_1_span, "00:00:00");
lv_style_set_text_color(&ui->screen_main_spangroup_1_span->style, lv_color_hex(0x000000));
lv_style_set_text_decor(&ui->screen_main_spangroup_1_span->style, LV_TEXT_DECOR_NONE);
lv_style_set_text_font(&ui->screen_main_spangroup_1_span->style, &lv_font_montserratMedium_16);
lv_obj_set_pos(ui->screen_main_spangroup_1, 81, 7);
lv_obj_set_size(ui->screen_main_spangroup_1, 90, 16);
//Write style state: LV_STATE_DEFAULT for &style_screen_main_spangroup_1_main_main_default
static lv_style_t style_screen_main_spangroup_1_main_main_default;
ui_init_style(&style_screen_main_spangroup_1_main_main_default);
lv_style_set_border_width(&style_screen_main_spangroup_1_main_main_default, 0);
lv_style_set_radius(&style_screen_main_spangroup_1_main_main_default, 0);
lv_style_set_bg_opa(&style_screen_main_spangroup_1_main_main_default, 0);
lv_style_set_pad_top(&style_screen_main_spangroup_1_main_main_default, 0);
lv_style_set_pad_right(&style_screen_main_spangroup_1_main_main_default, 0);
lv_style_set_pad_bottom(&style_screen_main_spangroup_1_main_main_default, 0);
lv_style_set_pad_left(&style_screen_main_spangroup_1_main_main_default, 0);
lv_style_set_shadow_width(&style_screen_main_spangroup_1_main_main_default, 0);
lv_obj_add_style(ui->screen_main_spangroup_1, &style_screen_main_spangroup_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_spangroup_refr_mode(ui->screen_main_spangroup_1);
//The custom code of screen_main.
//Update current screen layout.
lv_obj_update_layout(ui->screen_main);
}