summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/DisplayApp/Screens/Clock.cpp13
-rw-r--r--src/DisplayApp/Screens/Modal.cpp7
-rw-r--r--src/DisplayApp/Screens/Tile.cpp2
3 files changed, 7 insertions, 15 deletions
diff --git a/src/DisplayApp/Screens/Clock.cpp b/src/DisplayApp/Screens/Clock.cpp
index 1dff88c2..7051c433 100644
--- a/src/DisplayApp/Screens/Clock.cpp
+++ b/src/DisplayApp/Screens/Clock.cpp
@@ -48,11 +48,7 @@ Clock::Clock(DisplayApp* app,
label_date = lv_label_create(lv_scr_act(), NULL);
lv_label_set_style(label_date, LV_LABEL_STYLE_MAIN, labelStyle);
- lv_obj_align(label_date, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 80);
-
- label_version = lv_label_create(lv_scr_act(), NULL);
- lv_label_set_style(label_version, LV_LABEL_STYLE_MAIN, labelStyle);
- lv_obj_align(label_version, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 100);
+ lv_obj_align(label_date, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 60);
backgroundLabel = lv_label_create(lv_scr_act(), NULL);
backgroundLabel->user_data = this;
@@ -140,13 +136,6 @@ bool Clock::Refresh() {
}
}
- if(version.IsUpdated()) {
- auto dummy = version.Get();
- char versionStr[20];
- sprintf(versionStr, "VERSION: %d.%d.%d", Version::Major(), Version::Minor(), Version::Patch());
- lv_label_set_text(label_version, versionStr);
- }
-
return running;
}
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);
diff --git a/src/DisplayApp/Screens/Tile.cpp b/src/DisplayApp/Screens/Tile.cpp
index 72fe35bc..004c8d31 100644
--- a/src/DisplayApp/Screens/Tile.cpp
+++ b/src/DisplayApp/Screens/Tile.cpp
@@ -16,7 +16,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
screen->OnObjectEvent(obj, event, eventData);
}
-static const char * btnm_map1[] = {"Meter", "Gauge", "Clock", "\n", "MsgBox", "App2", "App3", ""};
+static const char * btnm_map1[] = {"Meter", "Gauge", "Clock", "\n", "Soft\nversion", "App2", "App3", ""};
Tile::Tile(DisplayApp* app) : Screen(app) {
modal.reset(new Modal(app));