From e58dcf6dc5332c60a346509436f9934d9e3bbfbb Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 12 Jun 2024 18:46:07 +1000 Subject: WIP fix issues introduced by lvgl version bump --- src/tangara/ui/modal.cpp | 57 ------------------------------------------------ 1 file changed, 57 deletions(-) delete mode 100644 src/tangara/ui/modal.cpp (limited to 'src/tangara/ui/modal.cpp') diff --git a/src/tangara/ui/modal.cpp b/src/tangara/ui/modal.cpp deleted file mode 100644 index 4f5a2432..00000000 --- a/src/tangara/ui/modal.cpp +++ /dev/null @@ -1,57 +0,0 @@ - -/* - * Copyright 2023 jacqueline - * - * SPDX-License-Identifier: GPL-3.0-only - */ - -#include "ui/modal.hpp" - -#include "misc/lv_color.h" - -#include "core/lv_event.h" -#include "esp_log.h" - -#include "core/lv_group.h" -#include "core/lv_obj_pos.h" -#include "database/index.hpp" -#include "events/event_queue.hpp" -#include "extra/widgets/list/lv_list.h" -#include "extra/widgets/menu/lv_menu.h" -#include "extra/widgets/spinner/lv_spinner.h" -#include "hal/lv_hal_disp.h" -#include "misc/lv_area.h" -#include "ui/screen.hpp" -#include "ui/themes.hpp" -#include "ui/ui_events.hpp" -#include "ui/ui_fsm.hpp" -#include "widgets/lv_label.h" - -namespace ui { - -Modal::Modal(Screen* host) - : root_(lv_obj_create(host->modal_content())), - group_(lv_group_create()), - host_(host) { - lv_obj_set_style_bg_opa(host->modal_content(), LV_OPA_40, 0); - - lv_obj_set_size(root_, 120, LV_SIZE_CONTENT); - lv_obj_center(root_); - - lv_obj_set_style_bg_opa(root_, LV_OPA_COVER, 0); - lv_obj_set_style_bg_color(root_, lv_color_white(), 0); - - host_->modal_group(group_); -} - -Modal::~Modal() { - host_->modal_group(nullptr); - lv_obj_set_style_bg_opa(host_->modal_content(), LV_OPA_TRANSP, 0); - - // The group *must* be deleted first. Otherwise, focus events will be - // generated whilst deleting the object tree, which causes a big mess. - lv_group_del(group_); - lv_obj_del(root_); -} - -} // namespace ui -- cgit v1.2.3