From 6a47edcd35884095946f761fa3aa2367c7c26442 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 28 Sep 2023 10:43:48 +1000 Subject: Use databinding for the top bar. It's so nice now! --- src/ui/screen_track_browser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ui/screen_track_browser.cpp') diff --git a/src/ui/screen_track_browser.cpp b/src/ui/screen_track_browser.cpp index 8d1fe653..ba27ad5e 100644 --- a/src/ui/screen_track_browser.cpp +++ b/src/ui/screen_track_browser.cpp @@ -16,6 +16,7 @@ #include "font/lv_symbol_def.h" #include "lvgl.h" #include "misc/lv_anim.h" +#include "model_top_bar.hpp" #include "screen_menu.hpp" #include "core/lv_event.h" @@ -59,6 +60,7 @@ static void item_select_cb(lv_event_t* ev) { } TrackBrowser::TrackBrowser( + models::TopBar& top_bar_model, std::weak_ptr db, const std::pmr::string& title, std::future*>&& initial_page) @@ -83,7 +85,7 @@ TrackBrowser::TrackBrowser( .show_back_button = true, .title = title, }; - auto top_bar = CreateTopBar(content_, config); + auto top_bar = CreateTopBar(content_, config, top_bar_model); back_button_ = top_bar->button(); list_ = lv_list_create(content_); -- cgit v1.2.3