Skip to main content
Associate II
July 21, 2025
Solved

NXP GUI guider generated LVGL code integration with STM32

  • July 21, 2025
  • 1 reply
  • 782 views

Has anyone in this community tried integrating LVGL code generated by NXP GUI guider with STM32 boards. Currently I am trying to integrate nxp gui guider generated code with STM32 for faster UI development. I have integrated LVGL library and I am able to run LVGL example widgets and animations. But when I integrated nxp gui guider generated code and tried running it, I am not getting output. Display flashes for less than a second and screen becomes blank. Please help me with this.

Thank you. 

Best answer by LouisB

Hello @VedantK33,

This is not possible, NXP GUI guider is not developed for STM32 products.

BR,

1 reply

LouisBBest answer
ST Employee
July 21, 2025

Hello @VedantK33,

This is not possible, NXP GUI guider is not developed for STM32 products.

BR,

VedantK33Author
Associate II
July 22, 2025

Hey thanks for the reply. 

Actually I am using it and I am getting output on my display. But problem I am facing is with opacity. The opacity configurations of objects and widgets generated by nxp guider is not proper. Initially I designed a normal textbox using guider. I got the output on the display. But when I tried some complex design it was not working. I think the problem is in the setup screen function. Please take a look at it once. 

Also I tried touchGFX. I am using STM32H755ZI development board. But I was facing lots of errors. I am using micro OLED display. TouchGFX designer supports few boards and display. So I shifted to LVGL which is very light weight and working smooth with this board. All the example codes are running with 30FPS and its consuming less CPU.             

Thanks and regards,

Vedant.


#include "../../LVGL/lvgl.h"
#include <stdio.h>
#include "../generated/gui_guider.h"
#include "events_init.h"
#include "widgets_init.h"
#include "../custom/custom.h"



void setup_scr_screen(lv_ui *ui)
{
 //Write codes screen
 ui->screen = lv_obj_create(NULL);
 lv_obj_set_size(ui->screen, 520, 360);
 lv_obj_set_scrollbar_mode(ui->screen, LV_SCROLLBAR_MODE_OFF);

 //Write style for screen, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
 lv_obj_set_style_bg_opa(ui->screen, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_bg_color(ui->screen, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);


 //Write codes screen_cont_1
 ui->screen_cont_1 = lv_obj_create(ui->screen);
 lv_obj_set_pos(ui->screen_cont_1, 1, 0);
 lv_obj_set_size(ui->screen_cont_1, 520, 360);
 lv_obj_set_scrollbar_mode(ui->screen_cont_1, LV_SCROLLBAR_MODE_OFF);

 //Write style for screen_cont_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
 lv_obj_set_style_border_width(ui->screen_cont_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_border_opa(ui->screen_cont_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_border_color(ui->screen_cont_1, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_border_side(ui->screen_cont_1, LV_BORDER_SIDE_FULL, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_radius(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_bg_opa(ui->screen_cont_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_bg_color(ui->screen_cont_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_bg_grad_dir(ui->screen_cont_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_top(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_bottom(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_left(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_right(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_shadow_width(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

 //Write codes screen_GPS_Llabel_1
 ui->screen_GPS_Llabel_1 = lv_label_create(ui->screen);
 lv_obj_set_pos(ui->screen_GPS_Llabel_1, 6, 5);
 lv_obj_set_size(ui->screen_GPS_Llabel_1, 180, 32);
 lv_label_set_text(ui->screen_GPS_Llabel_1, "Label");
 lv_label_set_long_mode(ui->screen_GPS_Llabel_1, LV_LABEL_LONG_WRAP);

 //Write style for screen_GPS_Llabel_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
 lv_obj_set_style_border_width(ui->screen_GPS_Llabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_radius(ui->screen_GPS_Llabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_color(ui->screen_GPS_Llabel_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_font(ui->screen_GPS_Llabel_1, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_opa(ui->screen_GPS_Llabel_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_letter_space(ui->screen_GPS_Llabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_line_space(ui->screen_GPS_Llabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_align(ui->screen_GPS_Llabel_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_bg_opa(ui->screen_GPS_Llabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_top(ui->screen_GPS_Llabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_right(ui->screen_GPS_Llabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_bottom(ui->screen_GPS_Llabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_left(ui->screen_GPS_Llabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_shadow_width(ui->screen_GPS_Llabel_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

 //Write codes screen_time_label_2
 ui->screen_time_label_2 = lv_label_create(ui->screen);
 lv_obj_set_pos(ui->screen_time_label_2, 350, 5);
 lv_obj_set_size(ui->screen_time_label_2, 100, 32);
 lv_label_set_text(ui->screen_time_label_2, "Label");
 lv_label_set_long_mode(ui->screen_time_label_2, LV_LABEL_LONG_WRAP);

 //Write style for screen_time_label_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
 lv_obj_set_style_border_width(ui->screen_time_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_radius(ui->screen_time_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_color(ui->screen_time_label_2, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_font(ui->screen_time_label_2, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_opa(ui->screen_time_label_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_letter_space(ui->screen_time_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_line_space(ui->screen_time_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_align(ui->screen_time_label_2, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_bg_opa(ui->screen_time_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_top(ui->screen_time_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_right(ui->screen_time_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_bottom(ui->screen_time_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_left(ui->screen_time_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_shadow_width(ui->screen_time_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

 //Write codes screen_img_1
 ui->screen_img_1 = lv_image_create(ui->screen);
 lv_obj_set_pos(ui->screen_img_1, 471, 5);
 lv_obj_set_size(ui->screen_img_1, 41, 39);
 lv_obj_add_flag(ui->screen_img_1, LV_OBJ_FLAG_CLICKABLE);
 lv_image_set_src(ui->screen_img_1, &_battery_RGB565A8_41x39);
 lv_image_set_pivot(ui->screen_img_1, 50,50);
 lv_image_set_rotation(ui->screen_img_1, 0);

 //Write style for screen_img_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
 lv_obj_set_style_image_recolor_opa(ui->screen_img_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_image_opa(ui->screen_img_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);

 //Write codes screen_cont_2
 ui->screen_cont_2 = lv_obj_create(ui->screen);
 lv_obj_set_pos(ui->screen_cont_2, 143, 5);
 lv_obj_set_size(ui->screen_cont_2, 205, 200);
 lv_obj_set_scrollbar_mode(ui->screen_cont_2, LV_SCROLLBAR_MODE_OFF);

 //Write style for screen_cont_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
 lv_obj_set_style_border_width(ui->screen_cont_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_radius(ui->screen_cont_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_bg_opa(ui->screen_cont_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_bg_color(ui->screen_cont_2, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_bg_grad_dir(ui->screen_cont_2, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_top(ui->screen_cont_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_bottom(ui->screen_cont_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_left(ui->screen_cont_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_right(ui->screen_cont_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_shadow_width(ui->screen_cont_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

 //Write codes screen_list_1
 ui->screen_list_1 = lv_list_create(ui->screen_cont_2);
 lv_obj_set_pos(ui->screen_list_1, 0, 30);
 lv_obj_set_size(ui->screen_list_1, 205, 170);
 lv_obj_set_scrollbar_mode(ui->screen_list_1, LV_SCROLLBAR_MODE_OFF);
 lv_obj_add_flag(ui->screen_list_1, LV_OBJ_FLAG_CLICK_FOCUSABLE);
 lv_obj_add_flag(ui->screen_list_1, LV_OBJ_FLAG_CLICKABLE);
 ui->screen_list_1_item0 = lv_list_add_button(ui->screen_list_1, LV_SYMBOL_BATTERY_3, "Battery");
 ui->screen_list_1_item1 = lv_list_add_button(ui->screen_list_1, LV_SYMBOL_WIFI, "Wifi");
 ui->screen_list_1_item2 = lv_list_add_button(ui->screen_list_1, LV_SYMBOL_EYE_OPEN, "LRF");
 ui->screen_list_1_item3 = lv_list_add_button(ui->screen_list_1, LV_SYMBOL_GPS, "GPS");
 ui->screen_list_1_item4 = lv_list_add_button(ui->screen_list_1, LV_SYMBOL_SD_CARD, "SD Card");
 ui->screen_list_1_item5 = lv_list_add_button(ui->screen_list_1, LV_SYMBOL_POWER, "Shut Down");

 //Write style state: LV_STATE_DEFAULT for &style_screen_list_1_main_main_default
 static lv_style_t style_screen_list_1_main_main_default;
 ui_init_style(&style_screen_list_1_main_main_default);

 lv_style_set_pad_top(&style_screen_list_1_main_main_default, 0);
 lv_style_set_pad_left(&style_screen_list_1_main_main_default, 0);
 lv_style_set_pad_right(&style_screen_list_1_main_main_default, 0);
 lv_style_set_pad_bottom(&style_screen_list_1_main_main_default, 0);
 lv_style_set_bg_opa(&style_screen_list_1_main_main_default, 255);
 lv_style_set_bg_color(&style_screen_list_1_main_main_default, lv_color_hex(0x00bdff));
 lv_style_set_bg_grad_dir(&style_screen_list_1_main_main_default, LV_GRAD_DIR_NONE);
 lv_style_set_border_width(&style_screen_list_1_main_main_default, 1);
 lv_style_set_border_opa(&style_screen_list_1_main_main_default, 255);
 lv_style_set_border_color(&style_screen_list_1_main_main_default, lv_color_hex(0xe1e6ee));
 lv_style_set_border_side(&style_screen_list_1_main_main_default, LV_BORDER_SIDE_FULL);
 lv_style_set_radius(&style_screen_list_1_main_main_default, 3);
 lv_style_set_shadow_width(&style_screen_list_1_main_main_default, 0);
 lv_obj_add_style(ui->screen_list_1, &style_screen_list_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

 //Write style state: LV_STATE_DEFAULT for &style_screen_list_1_main_scrollbar_default
 static lv_style_t style_screen_list_1_main_scrollbar_default;
 ui_init_style(&style_screen_list_1_main_scrollbar_default);

 lv_style_set_radius(&style_screen_list_1_main_scrollbar_default, 3);
 lv_style_set_bg_opa(&style_screen_list_1_main_scrollbar_default, 255);
 lv_style_set_bg_color(&style_screen_list_1_main_scrollbar_default, lv_color_hex(0xb0c7cf));
 lv_style_set_bg_grad_dir(&style_screen_list_1_main_scrollbar_default, LV_GRAD_DIR_NONE);
 lv_obj_add_style(ui->screen_list_1, &style_screen_list_1_main_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);

 //Write style state: LV_STATE_DEFAULT for &style_screen_list_1_extra_btns_main_default
 static lv_style_t style_screen_list_1_extra_btns_main_default;
 ui_init_style(&style_screen_list_1_extra_btns_main_default);

 lv_style_set_pad_top(&style_screen_list_1_extra_btns_main_default, 5);
 lv_style_set_pad_left(&style_screen_list_1_extra_btns_main_default, 14);
 lv_style_set_pad_right(&style_screen_list_1_extra_btns_main_default, 0);
 lv_style_set_pad_bottom(&style_screen_list_1_extra_btns_main_default, 3);
 lv_style_set_border_width(&style_screen_list_1_extra_btns_main_default, 0);
 lv_style_set_text_color(&style_screen_list_1_extra_btns_main_default, lv_color_hex(0x0D3055));
 lv_style_set_text_font(&style_screen_list_1_extra_btns_main_default, &lv_font_montserratMedium_15);
 lv_style_set_text_opa(&style_screen_list_1_extra_btns_main_default, 255);
 lv_style_set_radius(&style_screen_list_1_extra_btns_main_default, 0);
 lv_style_set_bg_opa(&style_screen_list_1_extra_btns_main_default, 0);
 lv_obj_add_style(ui->screen_list_1_item5, &style_screen_list_1_extra_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_add_style(ui->screen_list_1_item4, &style_screen_list_1_extra_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_add_style(ui->screen_list_1_item3, &style_screen_list_1_extra_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_add_style(ui->screen_list_1_item2, &style_screen_list_1_extra_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_add_style(ui->screen_list_1_item1, &style_screen_list_1_extra_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_add_style(ui->screen_list_1_item0, &style_screen_list_1_extra_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

 //Write style state: LV_STATE_FOCUSED for &style_screen_list_1_extra_btns_main_focused
 static lv_style_t style_screen_list_1_extra_btns_main_focused;
 ui_init_style(&style_screen_list_1_extra_btns_main_focused);

 lv_style_set_pad_top(&style_screen_list_1_extra_btns_main_focused, 5);
 lv_style_set_pad_left(&style_screen_list_1_extra_btns_main_focused, 5);
 lv_style_set_pad_right(&style_screen_list_1_extra_btns_main_focused, 5);
 lv_style_set_pad_bottom(&style_screen_list_1_extra_btns_main_focused, 5);
 lv_style_set_border_width(&style_screen_list_1_extra_btns_main_focused, 0);
 lv_style_set_radius(&style_screen_list_1_extra_btns_main_focused, 3);
 lv_style_set_text_color(&style_screen_list_1_extra_btns_main_focused, lv_color_hex(0x0D3055));
 lv_style_set_text_font(&style_screen_list_1_extra_btns_main_focused, &lv_font_montserratMedium_12);
 lv_style_set_text_opa(&style_screen_list_1_extra_btns_main_focused, 255);
 lv_style_set_bg_opa(&style_screen_list_1_extra_btns_main_focused, 255);
 lv_style_set_bg_color(&style_screen_list_1_extra_btns_main_focused, lv_color_hex(0xffffff));
 lv_style_set_bg_grad_dir(&style_screen_list_1_extra_btns_main_focused, LV_GRAD_DIR_NONE);
 lv_obj_add_style(ui->screen_list_1_item5, &style_screen_list_1_extra_btns_main_focused, LV_PART_MAIN|LV_STATE_FOCUSED);
 lv_obj_add_style(ui->screen_list_1_item4, &style_screen_list_1_extra_btns_main_focused, LV_PART_MAIN|LV_STATE_FOCUSED);
 lv_obj_add_style(ui->screen_list_1_item3, &style_screen_list_1_extra_btns_main_focused, LV_PART_MAIN|LV_STATE_FOCUSED);
 lv_obj_add_style(ui->screen_list_1_item2, &style_screen_list_1_extra_btns_main_focused, LV_PART_MAIN|LV_STATE_FOCUSED);
 lv_obj_add_style(ui->screen_list_1_item1, &style_screen_list_1_extra_btns_main_focused, LV_PART_MAIN|LV_STATE_FOCUSED);
 lv_obj_add_style(ui->screen_list_1_item0, &style_screen_list_1_extra_btns_main_focused, LV_PART_MAIN|LV_STATE_FOCUSED);

 //Write style state: LV_STATE_DEFAULT for &style_screen_list_1_extra_texts_main_default
 static lv_style_t style_screen_list_1_extra_texts_main_default;
 ui_init_style(&style_screen_list_1_extra_texts_main_default);

 lv_style_set_pad_top(&style_screen_list_1_extra_texts_main_default, 5);
 lv_style_set_pad_left(&style_screen_list_1_extra_texts_main_default, 0);
 lv_style_set_pad_right(&style_screen_list_1_extra_texts_main_default, 0);
 lv_style_set_pad_bottom(&style_screen_list_1_extra_texts_main_default, 0);
 lv_style_set_border_width(&style_screen_list_1_extra_texts_main_default, 0);
 lv_style_set_text_color(&style_screen_list_1_extra_texts_main_default, lv_color_hex(0x0D3055));
 lv_style_set_text_font(&style_screen_list_1_extra_texts_main_default, &lv_font_Alatsi_Regular_20);
 lv_style_set_text_opa(&style_screen_list_1_extra_texts_main_default, 255);
 lv_style_set_radius(&style_screen_list_1_extra_texts_main_default, 3);
 lv_style_set_transform_width(&style_screen_list_1_extra_texts_main_default, 0);
 lv_style_set_bg_opa(&style_screen_list_1_extra_texts_main_default, 0);

 //Write codes screen_label_1
 ui->screen_label_1 = lv_label_create(ui->screen_cont_2);
 lv_obj_set_pos(ui->screen_label_1, 0, 0);
 lv_obj_set_size(ui->screen_label_1, 205, 30);
 lv_label_set_text(ui->screen_label_1, "Settings");
 lv_label_set_long_mode(ui->screen_label_1, LV_LABEL_LONG_WRAP);

 //Write style for screen_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
 lv_obj_set_style_border_width(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_radius(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_color(ui->screen_label_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_font(ui->screen_label_1, &lv_font_montserratMedium_18, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_opa(ui->screen_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_letter_space(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_line_space(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_text_align(ui->screen_label_1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_bg_opa(ui->screen_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_bg_color(ui->screen_label_1, lv_color_hex(0x00bdff), LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_bg_grad_dir(ui->screen_label_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_top(ui->screen_label_1, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_right(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_bottom(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_pad_left(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
 lv_obj_set_style_shadow_width(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

 //The custom code of screen.


 //Update current screen layout.
 lv_obj_update_layout(ui->screen);

}