44#include " components/firmwarevalidator/FirmwareValidator.h"
55#include " displayapp/DisplayApp.h"
66#include " displayapp/InfiniTimeTheme.h"
7+ #include " displayapp/screens/Symbols.h"
78
89using namespace Pinetime ::Applications::Screens;
910
@@ -15,27 +16,40 @@ namespace {
1516}
1617
1718FirmwareValidation::FirmwareValidation (Pinetime::Controllers::FirmwareValidator& validator) : validator {validator} {
19+ lv_obj_t * title = lv_label_create (lv_scr_act (), nullptr );
20+ lv_label_set_text_static (title, " Firmware" );
21+ lv_label_set_align (title, LV_LABEL_ALIGN_CENTER);
22+ lv_obj_align (title, lv_scr_act (), LV_ALIGN_IN_TOP_MID, 10 , 15 );
23+
24+ lv_obj_t * icon = lv_label_create (lv_scr_act (), nullptr );
25+ lv_obj_set_style_local_text_color (icon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_ORANGE);
26+ lv_label_set_text_static (icon, Symbols::check);
27+ lv_label_set_align (icon, LV_LABEL_ALIGN_CENTER);
28+ lv_obj_align (icon, title, LV_ALIGN_OUT_LEFT_MID, -10 , 0 );
29+
1830 labelVersion = lv_label_create (lv_scr_act (), nullptr );
31+ lv_label_set_recolor (labelVersion, true );
1932 lv_label_set_text_fmt (labelVersion,
20- " Version: %lu.%lu.%lu\n "
21- " ShortRef: %s " ,
33+ " #808080 Version# %lu.%lu.%lu\n "
34+ " #808080 Short Ref# %s \n " ,
2235 Version::Major (),
2336 Version::Minor (),
2437 Version::Patch (),
2538 Version::GitCommitHash ());
26- lv_obj_align (labelVersion, nullptr , LV_ALIGN_IN_TOP_LEFT, 0 , 0 );
39+ lv_obj_align (labelVersion, nullptr , LV_ALIGN_CENTER, 0 , -40 );
40+ lv_label_set_align (labelVersion, LV_LABEL_ALIGN_CENTER);
2741
2842 labelIsValidated = lv_label_create (lv_scr_act (), nullptr );
29- lv_obj_align (labelIsValidated, labelVersion, LV_ALIGN_OUT_BOTTOM_LEFT, 0 , 0 );
43+ lv_obj_align (labelIsValidated, nullptr , LV_ALIGN_CENTER, 0 , 10 );
44+ lv_label_set_align (labelIsValidated, LV_LABEL_ALIGN_CENTER);
45+ lv_obj_set_auto_realign (labelIsValidated, true );
3046 lv_label_set_recolor (labelIsValidated, true );
31- lv_label_set_long_mode (labelIsValidated, LV_LABEL_LONG_BREAK);
32- lv_obj_set_width (labelIsValidated, 240 );
3347
3448 if (validator.IsValidated ()) {
35- lv_label_set_text_static (labelIsValidated, " You have already\n #00ff00 validated# this firmware#" );
49+ lv_label_set_text_static (labelIsValidated, " This firmware has\n been #00ff00 validated#" );
50+ lv_obj_align (labelIsValidated, nullptr , LV_ALIGN_CENTER, 0 , 10 );
3651 } else {
37- lv_label_set_text_static (labelIsValidated,
38- " Please #00ff00 Validate# this version or\n #ff0000 Reset# to rollback to the previous version." );
52+ lv_label_set_text_static (labelIsValidated, " Any reboot will\n rollback to last\n validated firmware" );
3953
4054 buttonValidate = lv_btn_create (lv_scr_act (), nullptr );
4155 buttonValidate->user_data = this ;
@@ -55,7 +69,7 @@ FirmwareValidation::FirmwareValidation(Pinetime::Controllers::FirmwareValidator&
5569 lv_obj_set_event_cb (buttonReset, ButtonEventHandler);
5670
5771 labelButtonReset = lv_label_create (buttonReset, nullptr );
58- lv_label_set_text_static (labelButtonReset, " Reset " );
72+ lv_label_set_text_static (labelButtonReset, " Rollback " );
5973 }
6074}
6175
0 commit comments