summaryrefslogtreecommitdiff
path: root/src/ui/screen_menu.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-07-13 10:58:06 +1000
committerjacqueline <me@jacqueline.id.au>2023-07-13 10:58:06 +1000
commitb6bc6b9e47605ede9bffe50445d1afe3acf0ab49 (patch)
tree05c9281c2763919b6a6780191f6ecc54547063ae /src/ui/screen_menu.cpp
parent2dc700b12f26109d987ad22f530e39d165025656 (diff)
downloadtangara-fw-b6bc6b9e47605ede9bffe50445d1afe3acf0ab49.tar.gz
Ui polish and fleshing out
Diffstat (limited to 'src/ui/screen_menu.cpp')
-rw-r--r--src/ui/screen_menu.cpp12
1 files changed, 12 insertions, 0 deletions
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<database::IndexInfo> 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);