diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-07-12 22:34:19 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-07-12 22:34:19 +1000 |
| commit | 8eabeedbb9a487653c6eca9cb814af3cccb29b6e (patch) | |
| tree | 43d1230334a547e40b5de63e9a16fc56a8950842 /src/ui/screen_playing.cpp | |
| parent | 50bb261f67a0a32a75f7cd76e0a4e4231f6d57c8 (diff) | |
| download | tangara-fw-8eabeedbb9a487653c6eca9cb814af3cccb29b6e.tar.gz | |
Make title bar a common component, some ui nits
Diffstat (limited to 'src/ui/screen_playing.cpp')
| -rw-r--r-- | src/ui/screen_playing.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/screen_playing.cpp b/src/ui/screen_playing.cpp index 6414f2f8..85200c4d 100644 --- a/src/ui/screen_playing.cpp +++ b/src/ui/screen_playing.cpp @@ -37,6 +37,7 @@ #include "track.hpp" #include "ui_events.hpp" #include "ui_fsm.hpp" +#include "widget_top_bar.hpp" #include "widgets/lv_btn.h" #include "widgets/lv_img.h" #include "widgets/lv_label.h" @@ -114,6 +115,8 @@ Playing::Playing(std::weak_ptr<database::Database> db, audio::TrackQueue* queue) lv_obj_set_flex_align(root_, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START); + lv_obj_set_scrollbar_mode(root_, LV_SCROLLBAR_MODE_OFF); + lv_obj_t* above_fold_container = lv_obj_create(root_); lv_obj_set_layout(above_fold_container, LV_LAYOUT_FLEX); lv_obj_set_size(above_fold_container, lv_pct(100), lv_disp_get_ver_res(NULL)); @@ -121,11 +124,8 @@ Playing::Playing(std::weak_ptr<database::Database> db, audio::TrackQueue* queue) lv_obj_set_flex_align(above_fold_container, LV_FLEX_ALIGN_SPACE_BETWEEN, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START); - lv_obj_t* back_button = lv_btn_create(above_fold_container); - lv_obj_set_size(back_button, LV_SIZE_CONTENT, LV_SIZE_CONTENT); - lv_obj_t* back_label = lv_label_create(back_button); - lv_label_set_text(back_label, "<"); - lv_group_add_obj(group_, back_button); + widgets::TopBar top_bar(above_fold_container, group_); + top_bar.set_title("Now Playing"); lv_obj_t* info_container = lv_obj_create(above_fold_container); lv_obj_set_layout(info_container, LV_LAYOUT_FLEX); |
