diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-02-12 17:10:03 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-02-12 17:10:03 +1100 |
| commit | 36f4c77fb22fd8ba433696a6fbd005d504e86186 (patch) | |
| tree | b3242f8edcd395f2b498fad40e43e1f36a9a2b00 /src/ui/themes.cpp | |
| parent | 03c0968168090b1093bda7e05874c201ae58b57b (diff) | |
| parent | 527374c72e1ec52e1d5814dbee3587ae100631dd (diff) | |
| download | tangara-fw-36f4c77fb22fd8ba433696a6fbd005d504e86186.tar.gz | |
Merge branch 'main' of codeberg.org:cool-tech-zone/tangara-fw
Diffstat (limited to 'src/ui/themes.cpp')
| -rw-r--r-- | src/ui/themes.cpp | 10 |
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); } } |
