summaryrefslogtreecommitdiff
path: root/src/tangara/ui/modal.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-06-14 13:34:41 +1000
committerjacqueline <me@jacqueline.id.au>2024-06-14 13:34:41 +1000
commit5086ab96ea648cd842addb02b188f29bff7bbadd (patch)
tree7a3579d655c906ace9e76c394c33eb164d7ce7aa /src/tangara/ui/modal.cpp
parent194f0e6b59259986b36448c376788c227d490f06 (diff)
parent37ed3996017e43b343e4880981d70c4a6d4a5636 (diff)
downloadtangara-fw-5086ab96ea648cd842addb02b188f29bff7bbadd.tar.gz
Merge branch 'jqln/lvgl-bump'
Diffstat (limited to 'src/tangara/ui/modal.cpp')
-rw-r--r--src/tangara/ui/modal.cpp57
1 files changed, 0 insertions, 57 deletions
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 <me@jacqueline.id.au>
- *
- * 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