From 824b8a7ebd0e8b4f876dd12f564e89238a1bb1b4 Mon Sep 17 00:00:00 2001 From: JF Date: Mon, 2 Mar 2020 20:12:46 +0100 Subject: Move version display from Clock screen to the modal window (accessible from tile menu) --- src/DisplayApp/Screens/Modal.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/DisplayApp/Screens/Modal.cpp') diff --git a/src/DisplayApp/Screens/Modal.cpp b/src/DisplayApp/Screens/Modal.cpp index 7a0264e3..fc353c49 100644 --- a/src/DisplayApp/Screens/Modal.cpp +++ b/src/DisplayApp/Screens/Modal.cpp @@ -36,12 +36,15 @@ void Modal::Show() { 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 */ - static const char * btns2[] = {"Ok", "Cancel", ""}; + static const char * btns2[] = {"Ok", ""}; /* Create the message box as a child of the modal background */ mbox = lv_mbox_create(obj, NULL); lv_mbox_add_btns(mbox, btns2); - lv_mbox_set_text(mbox, "Hello world!"); + char versionStr[20]; + sprintf(versionStr, "VERSION: %d.%d.%d", Version::Major(), Version::Minor(), Version::Patch()); + lv_mbox_set_text(mbox, versionStr); +// lv_mbox_set_text(mbox, "Hello world!"); lv_obj_align(mbox, NULL, LV_ALIGN_CENTER, 0, 0); lv_obj_set_event_cb(mbox, Modal::mbox_event_cb); -- cgit v1.2.3-70-g09d2