From 6f4ace1dd4b9b34f95af1ba365b68624e209d147 Mon Sep 17 00:00:00 2001 From: ailurux Date: Mon, 28 Aug 2023 14:59:29 +1000 Subject: Custom themes and top bar styling --- src/ui/widget_top_bar.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ui/widget_top_bar.cpp') diff --git a/src/ui/widget_top_bar.cpp b/src/ui/widget_top_bar.cpp index 7d4ef98c..458038a2 100644 --- a/src/ui/widget_top_bar.cpp +++ b/src/ui/widget_top_bar.cpp @@ -15,6 +15,7 @@ #include "ui_fsm.hpp" #include "widgets/lv_img.h" #include "widgets/lv_label.h" +#include "themes.hpp" namespace ui { namespace widgets { @@ -25,10 +26,12 @@ static void back_click_cb(lv_event_t* ev) { TopBar::TopBar(lv_obj_t* parent, const Configuration& config) { container_ = lv_obj_create(parent); - lv_obj_set_size(container_, lv_pct(100), 14); + lv_obj_set_size(container_, lv_pct(100), 18); lv_obj_set_flex_flow(container_, LV_FLEX_FLOW_ROW); - lv_obj_set_flex_align(container_, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START, + lv_obj_set_flex_align(container_, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_END); + + themes::Theme::instance()->ApplyStyle(container_, themes::Style::kTopBar); if (config.show_back_button) { back_button_ = lv_btn_create(container_); -- cgit v1.2.3