From b6bc6b9e47605ede9bffe50445d1afe3acf0ab49 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 13 Jul 2023 10:58:06 +1000 Subject: Ui polish and fleshing out --- src/ui/screen_menu.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/ui/screen_menu.cpp') diff --git a/src/ui/screen_menu.cpp b/src/ui/screen_menu.cpp index 743dc6fa..37254f92 100644 --- a/src/ui/screen_menu.cpp +++ b/src/ui/screen_menu.cpp @@ -20,6 +20,7 @@ #include "misc/lv_area.h" #include "ui_events.hpp" #include "ui_fsm.hpp" +#include "widget_top_bar.hpp" #include "widgets/lv_label.h" namespace ui { @@ -37,6 +38,17 @@ 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_FLEX_ALIGN_CENTER); + + widgets::TopBar::Configuration config{ + .show_back_button = false, + .title = "", + }; + CreateTopBar(root_, config); + lv_obj_t* list = lv_list_create(root_); 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