diff options
| author | Riku Isokoski <riksu9000@gmail.com> | 2021-08-28 16:54:40 +0300 |
|---|---|---|
| committer | Riku Isokoski <riksu9000@gmail.com> | 2021-08-28 16:54:40 +0300 |
| commit | 085c9ab2e15b35af01d73e823a87994a7a24a76f (patch) | |
| tree | 159c492ca36007f6239739fa46f7deb95be2d3bf /src/displayapp/screens/FirmwareValidation.cpp | |
| parent | 044036e884039237ade739d46b682e586a36e8df (diff) | |
| parent | fab49f8557ef8ff38fe4f607e33b18fb5a1aeb9a (diff) | |
Merge branch 'develop' into timer_battery_reading
Diffstat (limited to 'src/displayapp/screens/FirmwareValidation.cpp')
| -rw-r--r-- | src/displayapp/screens/FirmwareValidation.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/displayapp/screens/FirmwareValidation.cpp b/src/displayapp/screens/FirmwareValidation.cpp index 1d05be8d..34a43a9f 100644 --- a/src/displayapp/screens/FirmwareValidation.cpp +++ b/src/displayapp/screens/FirmwareValidation.cpp @@ -38,8 +38,9 @@ FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app, lv_label_set_text(labelIsValidated, "Please #00ff00 Validate# this version or\n#ff0000 Reset# to rollback to the previous version."); buttonValidate = lv_btn_create(lv_scr_act(), nullptr); - lv_obj_align(buttonValidate, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); buttonValidate->user_data = this; + lv_obj_set_size(buttonValidate, 115, 50); + lv_obj_align(buttonValidate, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); lv_obj_set_event_cb(buttonValidate, ButtonEventHandler); lv_obj_set_style_local_bg_color(buttonValidate, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x009900)); @@ -48,6 +49,7 @@ FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app, buttonReset = lv_btn_create(lv_scr_act(), nullptr); buttonReset->user_data = this; + lv_obj_set_size(buttonReset, 115, 50); lv_obj_align(buttonReset, nullptr, LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0); lv_obj_set_style_local_bg_color(buttonReset, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x990000)); lv_obj_set_event_cb(buttonReset, ButtonEventHandler); @@ -66,10 +68,10 @@ bool FirmwareValidation::Refresh() { } void FirmwareValidation::OnButtonEvent(lv_obj_t* object, lv_event_t event) { - if (object == buttonValidate && event == LV_EVENT_PRESSED) { + if (object == buttonValidate && event == LV_EVENT_CLICKED) { validator.Validate(); running = false; - } else if (object == buttonReset && event == LV_EVENT_PRESSED) { + } else if (object == buttonReset && event == LV_EVENT_CLICKED) { validator.Reset(); } } |
