Gui Guider Version: 1.2.1-GA // Windows 10
I'm able to edit the source code to a given background color via "lv_obj_set_style_local_bg_color", but I can't in the application itself. How do I edit the background color in Gui Guider? I don't see a widget or setting to address this in the application.
Solved! Go to Solution.
Hi,
The background of screen can't be set by GUI Guider, we will add the function in next release (v1.3.0). Currently you can manually add the code in custom.c of application to change screen background, you can also use container or image widget to implement the effect in the UI editor.
Best Regards,
Zhenhua
Good day!
Im still working with GUIGuider1.1 and used the following approach to set the screen's background
Ive created a new style, set its background, and added the style to the screen defined by GUIGuider.
Attached the code as in the screen definition file created by GUIGuider.
void setup_scr_scr_info(lv_ui *ui){
//Write codes scr_info
ui->scr_info = lv_obj_create(NULL, NULL);
//GvB added to set screen background to dark green : begin.....
static lv_style_t style_scr_info;
lv_style_set_bg_color(&style_scr_info, LV_STATE_DEFAULT, lv_color_hex(0x008800));
lv_obj_add_style(ui->scr_info, LV_OBJ_PART_MAIN, &style_scr_info);
//GvB added to set screen background end.....
//Write codes scr_info_btn_Settings
ui->scr_info_btn_Settings = lv_btn_create(ui->scr_info, NULL);
//Write style LV_BTN_PART_MAIN for scr_info_btn_Settings
static lv_style_t style_scr_info_btn_Settings_main;
lv_style_init(&style_scr_info_btn_Settings_main);
Thanks so much!
I'm not talking about the widgets themselves, that's clear. What I'm after is a global color setting for the screen background itself. This is a line in the source code, see reference above. By default it's transparent in Guider, and can only be changed with code and seen via simulator or hardware.
Hi,
The background of screen can't be set by GUI Guider, we will add the function in next release (v1.3.0). Currently you can manually add the code in custom.c of application to change screen background, you can also use container or image widget to implement the effect in the UI editor.
Best Regards,
Zhenhua
Thank you!
Hi,
The background color can be configured in GUI Guider, you will see the background setting when a widget is selected in the UI editor.
Best Regards,
Zhenhua