summaryrefslogtreecommitdiff
path: root/src/ui/screen_playing.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-09-28 10:43:48 +1000
committerjacqueline <me@jacqueline.id.au>2023-09-28 10:43:48 +1000
commit6a47edcd35884095946f761fa3aa2367c7c26442 (patch)
tree5b34e1bf14759dcc78b6611b1b6538dc03119860 /src/ui/screen_playing.cpp
parentf09ba5ffd53bf7d28e0dc516c00a8f69ca7efae9 (diff)
downloadtangara-fw-6a47edcd35884095946f761fa3aa2367c7c26442.tar.gz
Use databinding for the top bar. It's so nice now!
Diffstat (limited to 'src/ui/screen_playing.cpp')
-rw-r--r--src/ui/screen_playing.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/screen_playing.cpp b/src/ui/screen_playing.cpp
index 547bcf98..54e5feaf 100644
--- a/src/ui/screen_playing.cpp
+++ b/src/ui/screen_playing.cpp
@@ -37,6 +37,7 @@
#include "misc/lv_color.h"
#include "misc/lv_txt.h"
#include "model_playback.hpp"
+#include "model_top_bar.hpp"
#include "track.hpp"
#include "ui_events.hpp"
#include "ui_fsm.hpp"
@@ -101,7 +102,8 @@ auto Playing::next_up_label(lv_obj_t* parent, const std::pmr::string& text)
return button;
}
-Playing::Playing(models::Playback& playback_model,
+Playing::Playing(models::TopBar& top_bar_model,
+ models::Playback& playback_model,
std::weak_ptr<database::Database> db,
audio::TrackQueue& queue)
: db_(db),
@@ -158,7 +160,7 @@ Playing::Playing(models::Playback& playback_model,
.show_back_button = true,
.title = "Now Playing",
};
- CreateTopBar(above_fold_container, config);
+ CreateTopBar(above_fold_container, config, top_bar_model);
lv_obj_t* info_container = lv_obj_create(above_fold_container);
lv_obj_set_layout(info_container, LV_LAYOUT_FLEX);