Description
Main menu image is not refreshed
What MCU/Processor/Board and compiler are you using?
STM32F4 Disc
What LVGL version are you using?
7
What do you want to achieve?
When you click on the apply button, exit to the main menu
What have you tried so far?
void Main_menu(void)
{
static lv_point_t line_points[] = { {310, 30}, {10, 30} };
static lv_style_t style_line;
fill_main_lcd = lv_scr_act();
line1 = lv_line_create(lv_scr_act(), NULL);
lv_obj_set_style_local_bg_color(fill_main_lcd, LV_OBJ_PART_MAIN, 0, LV_COLOR_BLUE);
lv_style_set_line_width(&style_line, LV_STATE_DEFAULT, 2);
lv_style_set_line_color(&style_line, LV_STATE_DEFAULT, LV_COLOR_WHITE);
lv_style_set_line_rounded(&style_line, LV_STATE_DEFAULT, true);
lv_line_set_points(line1, line_points, 2);
lv_obj_add_style(line1, LV_LINE_PART_MAIN, &style_line);
Print_Icon_Therm();
Set_Clock_Button();
Set_Custom_Button();
}
At startup it looks like this
static void event_handler_set_time(lv_obj_t * obj, lv_event_t event)
{
if(event == LV_EVENT_CLICKED) {
RTC_DateTime.RTC_Hours=lv_slider_get_value(slider_h);
RTC_DateTime.RTC_Minutes=lv_slider_get_value(slider_m);
RTC_DateTime.RTC_Seconds=0;
RTC_SetTime(RTC_Format_BIN, &RTC_DateTime);
Main_menu();
}
}
Does not completely redraw. What am I doing wrong?
Code to reproduce
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
/*You code here*/
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.