Skip to content

Commit

Permalink
Fix Toolbar background flickering
Browse files Browse the repository at this point in the history
  • Loading branch information
jgauchia committed Aug 16, 2024
1 parent b9a3daa commit 96c4ed7
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions lib/gui/src/mainScr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,17 +427,16 @@ void toolBarEvent(lv_event_t *event)

if (!showToolBar)
{
lv_obj_add_flag(btnFullScreen, LV_OBJ_FLAG_HIDDEN);
lv_obj_add_flag(btnZoomOut, LV_OBJ_FLAG_HIDDEN);
lv_obj_add_flag(btnZoomIn, LV_OBJ_FLAG_HIDDEN);
lv_obj_clear_flag(btnFullScreen, LV_OBJ_FLAG_CLICKABLE);
lv_obj_clear_flag(btnZoomOut, LV_OBJ_FLAG_CLICKABLE);
lv_obj_clear_flag(btnZoomIn, LV_OBJ_FLAG_CLICKABLE);
}
else
{
lv_obj_clear_flag(btnFullScreen, LV_OBJ_FLAG_HIDDEN);
lv_obj_clear_flag(btnZoomOut, LV_OBJ_FLAG_HIDDEN);
lv_obj_clear_flag(btnZoomIn, LV_OBJ_FLAG_HIDDEN);
lv_obj_add_flag(btnFullScreen, LV_OBJ_FLAG_CLICKABLE);
lv_obj_add_flag(btnZoomOut, LV_OBJ_FLAG_CLICKABLE);
lv_obj_add_flag(btnZoomIn, LV_OBJ_FLAG_CLICKABLE);
}
//lv_obj_invalidate(btnFullScreen);
}

/**
Expand Down Expand Up @@ -703,15 +702,15 @@ void createMainScr()

if (!showToolBar)
{
lv_obj_add_flag(btnFullScreen, LV_OBJ_FLAG_HIDDEN);
lv_obj_add_flag(btnZoomOut, LV_OBJ_FLAG_HIDDEN);
lv_obj_add_flag(btnZoomIn, LV_OBJ_FLAG_HIDDEN);
lv_obj_clear_flag(btnFullScreen, LV_OBJ_FLAG_CLICKABLE);
lv_obj_clear_flag(btnZoomOut, LV_OBJ_FLAG_CLICKABLE);
lv_obj_clear_flag(btnZoomIn, LV_OBJ_FLAG_CLICKABLE);
}
else
{
lv_obj_clear_flag(btnFullScreen, LV_OBJ_FLAG_HIDDEN);
lv_obj_clear_flag(btnZoomOut, LV_OBJ_FLAG_HIDDEN);
lv_obj_clear_flag(btnZoomIn, LV_OBJ_FLAG_HIDDEN);
lv_obj_add_flag(btnFullScreen, LV_OBJ_FLAG_CLICKABLE);
lv_obj_add_flag(btnZoomOut, LV_OBJ_FLAG_CLICKABLE);
lv_obj_add_flag(btnZoomIn, LV_OBJ_FLAG_CLICKABLE);
}

// Map Tile Events
Expand Down

0 comments on commit 96c4ed7

Please sign in to comment.