summaryrefslogtreecommitdiff
path: root/src/ui/themes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/themes.cpp')
-rw-r--r--src/ui/themes.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ui/themes.cpp b/src/ui/themes.cpp
index bad73ee6..f8390570 100644
--- a/src/ui/themes.cpp
+++ b/src/ui/themes.cpp
@@ -89,6 +89,14 @@ Theme::Theme() {
lv_style_set_border_color(&dropdown_style_, lv_palette_main(LV_PALETTE_BLUE));
lv_style_set_border_side(&dropdown_style_, LV_BORDER_SIDE_FULL);
+ lv_style_init(&dropdown_list_style_);
+ lv_style_set_radius(&dropdown_list_style_, 2);
+ lv_style_set_border_width(&dropdown_list_style_, 1);
+ lv_style_set_border_color(&dropdown_list_style_, lv_palette_main(LV_PALETTE_BLUE_GREY));
+ lv_style_set_bg_opa(&dropdown_list_style_, LV_OPA_COVER);
+ lv_style_set_bg_color(&dropdown_list_style_, lv_color_white());
+ lv_style_set_pad_all(&dropdown_list_style_, 2);
+
lv_theme_t* parent_theme = lv_disp_get_theme(NULL);
theme_ = *parent_theme;
theme_.user_data = this;
@@ -124,6 +132,8 @@ void Theme::Callback(lv_obj_t* obj) {
lv_obj_add_style(obj, &switch_knob_style_, LV_PART_KNOB);
} else if (lv_obj_check_type(obj, &lv_dropdown_class)) {
lv_obj_add_style(obj, &dropdown_style_, LV_PART_MAIN);
+ } else if (lv_obj_check_type(obj, &lv_dropdownlist_class)) {
+ lv_obj_add_style(obj, &dropdown_list_style_, LV_PART_MAIN);
}
}