summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/FirmwareValidation.cpp
diff options
context:
space:
mode:
authorKieran Cawthray <kieranc@gmail.com>2021-07-11 16:04:50 +0200
committerKieran Cawthray <kieranc@gmail.com>2021-07-11 16:04:50 +0200
commitf970dc9993d3d1ff108dbe9a70048571d8a6b53e (patch)
tree1293d181ecf545ff404fbb4eb120ff0b1877241d /src/displayapp/screens/FirmwareValidation.cpp
parentf5639db8ed48a332eeeed48a359a3323b0537d39 (diff)
parent6a91b83b12ef849f68d54f490153b02f0ecf58dc (diff)
Merge remote-tracking branch 'upstream/develop' into pinetimestyle-colorpicker
Diffstat (limited to 'src/displayapp/screens/FirmwareValidation.cpp')
-rw-r--r--src/displayapp/screens/FirmwareValidation.cpp32
1 files changed, 10 insertions, 22 deletions
diff --git a/src/displayapp/screens/FirmwareValidation.cpp b/src/displayapp/screens/FirmwareValidation.cpp
index ad37a3df..1d05be8d 100644
--- a/src/displayapp/screens/FirmwareValidation.cpp
+++ b/src/displayapp/screens/FirmwareValidation.cpp
@@ -16,30 +16,18 @@ namespace {
FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::FirmwareValidator& validator)
: Screen {app}, validator {validator} {
- labelVersionInfo = lv_label_create(lv_scr_act(), nullptr);
- lv_obj_align(labelVersionInfo, nullptr, LV_ALIGN_IN_TOP_LEFT, 0, 0);
- lv_label_set_text(labelVersionInfo, "Version : ");
- lv_label_set_align(labelVersionInfo, LV_LABEL_ALIGN_LEFT);
-
- labelVersionValue = lv_label_create(lv_scr_act(), nullptr);
- lv_obj_align(labelVersionValue, labelVersionInfo, LV_ALIGN_OUT_RIGHT_MID, 0, 0);
- lv_label_set_recolor(labelVersionValue, true);
- sprintf(version, "%ld.%ld.%ld", Version::Major(), Version::Minor(), Version::Patch());
- lv_label_set_text(labelVersionValue, version);
-
- labelShortRefInfo = lv_label_create(lv_scr_act(), nullptr);
- lv_obj_align(labelShortRefInfo, nullptr, LV_ALIGN_IN_TOP_LEFT, 0, 25);
- lv_label_set_text(labelShortRefInfo, "ShortRef : ");
- lv_label_set_align(labelShortRefInfo, LV_LABEL_ALIGN_LEFT);
-
- labelShortRefValue = lv_label_create(lv_scr_act(), nullptr);
- lv_obj_align(labelShortRefValue, labelShortRefInfo, LV_ALIGN_OUT_RIGHT_MID, 0, 0);
- lv_label_set_recolor(labelShortRefValue, true);
- sprintf(shortref, "%s", Version::GitCommitHash());
- lv_label_set_text(labelShortRefValue, shortref);
+ labelVersion = lv_label_create(lv_scr_act(), nullptr);
+ lv_label_set_text_fmt(labelVersion,
+ "Version : %d.%d.%d\n"
+ "ShortRef : %s",
+ Version::Major(),
+ Version::Minor(),
+ Version::Patch(),
+ Version::GitCommitHash());
+ lv_obj_align(labelVersion, nullptr, LV_ALIGN_IN_TOP_LEFT, 0, 0);
labelIsValidated = lv_label_create(lv_scr_act(), nullptr);
- lv_obj_align(labelIsValidated, nullptr, LV_ALIGN_IN_TOP_LEFT, 0, 50);
+ lv_obj_align(labelIsValidated, labelVersion, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0);
lv_label_set_recolor(labelIsValidated, true);
lv_label_set_long_mode(labelIsValidated, LV_LABEL_LONG_BREAK);
lv_obj_set_width(labelIsValidated, 240);