diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-07-05 20:28:59 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-07-05 20:28:59 +1000 |
| commit | 161815a268cff029f15857780fbd31308e9f9f00 (patch) | |
| tree | 45a5f863ad57d2b02d1d0d4caf2b71e44e9e04b4 /src/ui/screen_splash.cpp | |
| parent | 7eec2cc5b6e8fb1b3a11c09a2e324f83a8192860 (diff) | |
| parent | 06ce512ce93eb17fddc735b7c65c2944e08e5b84 (diff) | |
| download | tangara-fw-161815a268cff029f15857780fbd31308e9f9f00.tar.gz | |
Merge branch 'splash'
Diffstat (limited to 'src/ui/screen_splash.cpp')
| -rw-r--r-- | src/ui/screen_splash.cpp | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/src/ui/screen_splash.cpp b/src/ui/screen_splash.cpp index 2b2a7b1e..0c8e8435 100644 --- a/src/ui/screen_splash.cpp +++ b/src/ui/screen_splash.cpp @@ -6,33 +6,28 @@ #include "screen_splash.hpp" -#include "core/lv_obj_pos.h" -#include "extra/widgets/spinner/lv_spinner.h" +#include "core/lv_obj.h" +#include "core/lv_obj_style.h" +#include "lvgl.h" #include "misc/lv_area.h" -#include "widgets/lv_label.h" +#include "misc/lv_color.h" +#include "misc/lv_style.h" + +LV_IMG_DECLARE(splash); namespace ui { namespace screens { Splash::Splash() { - container_ = lv_obj_create(root_); - lv_obj_set_align(container_, LV_ALIGN_CENTER); - lv_obj_set_size(container_, LV_SIZE_CONTENT, LV_SIZE_CONTENT); - - label_ = lv_label_create(container_); - lv_label_set_text_static(label_, "TANGARA"); - lv_obj_set_align(label_, LV_ALIGN_TOP_MID); + lv_obj_set_style_bg_opa(root_, LV_OPA_COVER, 0); + lv_obj_set_style_bg_color(root_, lv_color_black(), 0); - spinner_ = lv_spinner_create(container_, 1000, 60); - lv_obj_set_size(spinner_, 32, 32); - lv_obj_align_to(spinner_, label_, LV_ALIGN_OUT_BOTTOM_MID, 0, 8); + lv_obj_t *logo = lv_img_create(root_); + lv_img_set_src(logo, &splash); + lv_obj_center(logo); } -Splash::~Splash() { - lv_obj_del(spinner_); - lv_obj_del(label_); - lv_obj_del(container_); -} +Splash::~Splash() {} } // namespace screens } // namespace ui |
