From 3b3bc64d19715c418f407d5231795ca5a2c2fa71 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 25 Aug 2023 10:13:37 +1000 Subject: Add modal dialog support --- src/ui/screen_menu.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ui/screen_menu.cpp') diff --git a/src/ui/screen_menu.cpp b/src/ui/screen_menu.cpp index 4730db84..8c402532 100644 --- a/src/ui/screen_menu.cpp +++ b/src/ui/screen_menu.cpp @@ -37,18 +37,18 @@ static void item_click_cb(lv_event_t* ev) { } Menu::Menu(std::vector indexes) : indexes_(indexes) { - lv_obj_set_layout(root_, LV_LAYOUT_FLEX); - lv_obj_set_flex_flow(root_, LV_FLEX_FLOW_COLUMN); - lv_obj_set_flex_align(root_, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, + lv_obj_set_layout(content_, LV_LAYOUT_FLEX); + lv_obj_set_flex_flow(content_, LV_FLEX_FLOW_COLUMN); + lv_obj_set_flex_align(content_, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER); widgets::TopBar::Configuration config{ .show_back_button = false, .title = "", }; - CreateTopBar(root_, config); + CreateTopBar(content_, config); - lv_obj_t* list = lv_list_create(root_); + lv_obj_t* list = lv_list_create(content_); lv_obj_set_size(list, lv_disp_get_hor_res(NULL), lv_disp_get_ver_res(NULL)); lv_obj_center(list); -- cgit v1.2.3