summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Modal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/Modal.cpp')
-rw-r--r--src/displayapp/screens/Modal.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/displayapp/screens/Modal.cpp b/src/displayapp/screens/Modal.cpp
index d1a110e..088456c 100644
--- a/src/displayapp/screens/Modal.cpp
+++ b/src/displayapp/screens/Modal.cpp
@@ -3,8 +3,6 @@
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_extrabold_compressed;
-extern lv_font_t jetbrains_mono_bold_20;
Modal::Modal(Pinetime::Applications::DisplayApp *app) : Screen(app) {
@@ -42,7 +40,7 @@ void Modal::OnEvent(lv_obj_t *event_obj, lv_event_t evt) {
Hide();
} else if(evt == LV_EVENT_VALUE_CHANGED) {
/* A button was clicked */
- lv_mbox_start_auto_close(mbox, 0);
+ lv_msgbox_start_auto_close(mbox, 0);
// Hide();
}
}
@@ -50,32 +48,38 @@ void Modal::OnEvent(lv_obj_t *event_obj, lv_event_t evt) {
void Modal::Show(const char* msg) {
if(isVisible) return;
isVisible = true;
- lv_style_copy(&modal_style, &lv_style_plain_color);
+
+ // ##joaquimorg to FIX
+ /*lv_style_copy(&modal_style, &lv_style_plain_color);
modal_style.body.main_color = modal_style.body.grad_color = LV_COLOR_BLACK;
- modal_style.body.opa = LV_OPA_50;
+ modal_style.body.opa = LV_OPA_50;*/
obj = lv_obj_create(lv_scr_act(), nullptr);
- lv_obj_set_style(obj, &modal_style);
+ // ##joaquimorg to FIX
+ //lv_obj_set_style(obj, &modal_style);
lv_obj_set_pos(obj, 0, 0);
lv_obj_set_size(obj, LV_HOR_RES, LV_VER_RES);
- lv_obj_set_opa_scale_enable(obj, true); /* Enable opacity scaling for the animation */
+
+ // ##joaquimorg to FIX
+ //lv_obj_set_opa_scale_enable(obj, true); /* Enable opacity scaling for the animation */
static const char * btns2[] = {"Ok", ""};
/* Create the message box as a child of the modal background */
- mbox = lv_mbox_create(obj, nullptr);
- lv_mbox_add_btns(mbox, btns2);
- lv_mbox_set_text(mbox, msg);
+ mbox = lv_msgbox_create(obj, nullptr);
+ lv_msgbox_add_btns(mbox, btns2);
+ lv_msgbox_set_text(mbox, msg);
lv_obj_align(mbox, nullptr, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_event_cb(mbox, Modal::mbox_event_cb);
mbox->user_data = this;
/* Fade the message box in with an animation */
- lv_anim_t a;
+ // ##joaquimorg to FIX
+ /*lv_anim_t a;
lv_anim_init(&a);
lv_anim_set_time(&a, 500, 0);
lv_anim_set_values(&a, LV_OPA_TRANSP, LV_OPA_COVER);
lv_anim_set_exec_cb(&a, obj, (lv_anim_exec_xcb_t)lv_obj_set_opa_scale);
- lv_anim_create(&a);
+ lv_anim_create(&a);*/
}