summaryrefslogtreecommitdiff
path: root/src/ui/widget_top_bar.cpp
diff options
context:
space:
mode:
authorailurux <ailuruxx@gmail.com>2023-08-28 14:59:29 +1000
committerailurux <ailuruxx@gmail.com>2023-08-28 14:59:29 +1000
commit6f4ace1dd4b9b34f95af1ba365b68624e209d147 (patch)
tree0a880056b63d391dee467c2a6e3d1064b3a75a77 /src/ui/widget_top_bar.cpp
parent0f5cf25e73fb2e789b472317966ff80323dddd75 (diff)
downloadtangara-fw-6f4ace1dd4b9b34f95af1ba365b68624e209d147.tar.gz
Custom themes and top bar styling
Diffstat (limited to 'src/ui/widget_top_bar.cpp')
-rw-r--r--src/ui/widget_top_bar.cpp7
1 files changed, 5 insertions, 2 deletions
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_);