From 6fd588e970470b15936187980829916d0dbe77bb Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 1 Jun 2023 15:28:32 +1000 Subject: Add touchwheel -> encoder adapter --- src/ui/screen_splash.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/ui/screen_splash.cpp (limited to 'src/ui/screen_splash.cpp') diff --git a/src/ui/screen_splash.cpp b/src/ui/screen_splash.cpp new file mode 100644 index 00000000..2b2a7b1e --- /dev/null +++ b/src/ui/screen_splash.cpp @@ -0,0 +1,38 @@ +/* + * Copyright 2023 jacqueline + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#include "screen_splash.hpp" + +#include "core/lv_obj_pos.h" +#include "extra/widgets/spinner/lv_spinner.h" +#include "misc/lv_area.h" +#include "widgets/lv_label.h" + +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); + + 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); +} + +Splash::~Splash() { + lv_obj_del(spinner_); + lv_obj_del(label_); + lv_obj_del(container_); +} + +} // namespace screens +} // namespace ui -- cgit v1.2.3