diff options
| author | cooljqln <cooljqln@noreply.codeberg.org> | 2024-05-03 04:48:17 +0000 |
|---|---|---|
| committer | cooljqln <cooljqln@noreply.codeberg.org> | 2024-05-03 04:48:17 +0000 |
| commit | 3ceb8025ee4330c177101ed30ec17dfb0002f41e (patch) | |
| tree | 58350210f15df7d00d967cac6f30eeceeb031a3c /src/tangara/ui/screen_splash.cpp | |
| parent | 964da15a0b84f8e5f00e8abac2f7dfda0bf60488 (diff) | |
| parent | 9fafd797a5504f458b5fcae4a1d28a68da936315 (diff) | |
| download | tangara-fw-3ceb8025ee4330c177101ed30ec17dfb0002f41e.tar.gz | |
Merge pull request 'Break dependency cycles with our components by merging co-dependent components together' (#68) from jqln/component-merge into main
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/68
Diffstat (limited to 'src/tangara/ui/screen_splash.cpp')
| -rw-r--r-- | src/tangara/ui/screen_splash.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/tangara/ui/screen_splash.cpp b/src/tangara/ui/screen_splash.cpp new file mode 100644 index 00000000..651f00dd --- /dev/null +++ b/src/tangara/ui/screen_splash.cpp @@ -0,0 +1,33 @@ +/* + * Copyright 2023 jacqueline <me@jacqueline.id.au> + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#include "ui/screen_splash.hpp" + +#include "core/lv_obj.h" +#include "core/lv_obj_style.h" +#include "lvgl.h" +#include "misc/lv_area.h" +#include "misc/lv_color.h" +#include "misc/lv_style.h" + +LV_IMG_DECLARE(splash); + +namespace ui { +namespace screens { + +Splash::Splash() { + lv_obj_set_style_bg_opa(root_, LV_OPA_COVER, 0); + lv_obj_set_style_bg_color(root_, lv_color_black(), 0); + + lv_obj_t* logo = lv_img_create(root_); + lv_img_set_src(logo, &splash); + lv_obj_center(logo); +} + +Splash::~Splash() {} + +} // namespace screens +} // namespace ui |
