diff --git a/lib_nbgl/src/nbgl_layout.c b/lib_nbgl/src/nbgl_layout.c index ef58a05f7..1b46c410c 100644 --- a/lib_nbgl/src/nbgl_layout.c +++ b/lib_nbgl/src/nbgl_layout.c @@ -1749,17 +1749,21 @@ int nbgl_layoutAddHorizontalButtons(nbgl_layout_t *layout obj->index = 1; button->obj.alignment = BOTTOM_LEFT; button->obj.alignmentMarginX = BORDER_MARGIN; +#ifdef TARGET_STAX + button->obj.alignmentMarginY = 20; // 20 pixels from screen bottom +#else // TARGET_STAX button->obj.alignmentMarginY = 24; // 24 pixels from screen bottom - button->borderColor = LIGHT_GRAY; - button->innerColor = WHITE; - button->foregroundColor = BLACK; - button->obj.area.width = BUTTON_DIAMETER; - button->obj.area.height = BUTTON_DIAMETER; - button->radius = BUTTON_RADIUS; - button->icon = PIC(info->leftIcon); - button->fontId = SMALL_BOLD_FONT; - button->obj.touchMask = (1 << TOUCHED); - button->obj.touchId = CHOICE_2_ID; +#endif // TARGET_STAX + button->borderColor = LIGHT_GRAY; + button->innerColor = WHITE; + button->foregroundColor = BLACK; + button->obj.area.width = BUTTON_DIAMETER; + button->obj.area.height = BUTTON_DIAMETER; + button->radius = BUTTON_RADIUS; + button->icon = PIC(info->leftIcon); + button->fontId = SMALL_BOLD_FONT; + button->obj.touchMask = (1 << TOUCHED); + button->obj.touchId = CHOICE_2_ID; // set this new button as child of the container layoutAddObject(layoutInt, (nbgl_obj_t *) button); @@ -2494,15 +2498,16 @@ int nbgl_layoutAddHeader(nbgl_layout_t *layout, const nbgl_layoutHeader_t *heade if (obj == NULL) { return -1; } - textArea->obj.alignment = MID_RIGHT; - textArea->textColor = BLACK; - textArea->obj.area.width = AVAILABLE_WIDTH; - textArea->obj.area.height = TOUCHABLE_HEADER_BAR_HEIGHT; - textArea->text = PIC(headerDesc->rightText.text); - textArea->fontId = SMALL_BOLD_FONT; - textArea->textAlignment = MID_RIGHT; - textArea->obj.touchMask = (1 << TOUCHED); - textArea->obj.touchId = TOP_RIGHT_BUTTON_ID; + textArea->obj.alignment = MID_RIGHT; + textArea->obj.alignmentMarginX = BORDER_MARGIN; + textArea->textColor = BLACK; + textArea->obj.area.width = AVAILABLE_WIDTH; + textArea->obj.area.height = TOUCHABLE_HEADER_BAR_HEIGHT; + textArea->text = PIC(headerDesc->rightText.text); + textArea->fontId = SMALL_BOLD_FONT; + textArea->textAlignment = MID_RIGHT; + textArea->obj.touchMask = (1 << TOUCHED); + textArea->obj.touchId = TOP_RIGHT_BUTTON_ID; // add to bottom container layoutInt->headerContainer->children[layoutInt->headerContainer->nbChildren] = (nbgl_obj_t *) textArea; diff --git a/lib_nbgl/src/nbgl_layout_navigation.c b/lib_nbgl/src/nbgl_layout_navigation.c index c11836e46..5bec637c9 100644 --- a/lib_nbgl/src/nbgl_layout_navigation.c +++ b/lib_nbgl/src/nbgl_layout_navigation.c @@ -202,8 +202,7 @@ void layoutNavigationPopulate(nbgl_container_t *navContainer, SPRINTF(navText, "%d of %d", navConfig->activePage + 1, navConfig->nbPages); - textArea->obj.alignment = BOTTOM_RIGHT; - textArea->textColor = DARK_GRAY; + textArea->textColor = DARK_GRAY; #ifdef TARGET_STAX textArea->obj.area.width = 109; #else // TARGET_STAX @@ -213,8 +212,7 @@ void layoutNavigationPopulate(nbgl_container_t *navContainer, textArea->fontId = SMALL_REGULAR_FONT; textArea->obj.area.height = NAV_BUTTON_HEIGHT; textArea->textAlignment = CENTER; - textArea->obj.alignment = MID_RIGHT; - textArea->obj.alignmentMarginX = NAV_BUTTON_WIDTH - 15; + textArea->obj.alignment = CENTER; navContainer->children[PAGE_INDICATOR_INDEX] = (nbgl_obj_t *) textArea; } if (navConfig->withBackKey) { diff --git a/lib_nbgl/src/nbgl_use_case.c b/lib_nbgl/src/nbgl_use_case.c index 44c447964..8c33aaba4 100644 --- a/lib_nbgl/src/nbgl_use_case.c +++ b/lib_nbgl/src/nbgl_use_case.c @@ -347,9 +347,8 @@ static void prepareNavInfo(bool isReview, uint8_t nbPages, const char *rejectTex navInfo.navWithButtons.backButton = true; } else { - navInfo.quitToken = REJECT_TOKEN; - UNUSED(rejectText); - navInfo.navWithButtons.quitText = "Reject"; + navInfo.quitToken = REJECT_TOKEN; + navInfo.navWithButtons.quitText = rejectText; navInfo.navWithButtons.navToken = NAV_TOKEN; navInfo.navWithButtons.backButton = ((navType == STREAMING_NAV) && (nbPages < 2)) ? false : true; @@ -1232,12 +1231,12 @@ static void displaySkipWarning(void) { nbgl_pageConfirmationDescription_t info = { .cancelText = "Go back to review", - .centeredInfo.text1 = "Skip message review?", + .centeredInfo.text1 = "Skip review?", .centeredInfo.text2 - = "Skip only if you trust the\nsource. If you skip, you won't\nbe able to review it again.", + = "If you're sure you don't need to review all fields, you can skip straight to signing.", .centeredInfo.text3 = NULL, .centeredInfo.style = LARGE_CASE_INFO, - .centeredInfo.icon = &C_Warning_64px, + .centeredInfo.icon = &C_Important_Circle_64px, .centeredInfo.offsetY = 0, .confirmationText = "Yes, skip", .confirmationToken = SKIP_TOKEN, @@ -1557,7 +1556,7 @@ static void bundleNavReviewAskRejectionConfirmation(nbgl_operationType_t operati } // display a choice to confirm/cancel rejection - nbgl_useCaseConfirm(title, NULL, "Yes, Reject", confirmText, callback); + nbgl_useCaseConfirm(title, NULL, "Yes, reject", confirmText, callback); } static void bundleNavReviewChoice(bool confirm) @@ -2889,7 +2888,7 @@ void nbgl_useCaseAddressConfirmationExt(const char *addres // fill navigation structure, common to all pages uint8_t nbPages = nbgl_useCaseGetNbPagesForGenericContents(&genericContext.genericContents, 0); - prepareNavInfo(true, nbPages, "Reject"); + prepareNavInfo(true, nbPages, "Cancel"); displayGenericContextPage(0, true); } @@ -2944,7 +2943,7 @@ void nbgl_useCaseAddressReview(const char *address, // fill navigation structure, common to all pages uint8_t nbPages = nbgl_useCaseGetNbPagesForGenericContents(&genericContext.genericContents, 0); - prepareNavInfo(true, nbPages, "Reject"); + prepareNavInfo(true, nbPages, "Cancel"); #ifdef HAVE_PIEZO_SOUND // Play notification sound