From 973e8e96611692b006356fff1b836966d15d3487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Lucet?= Date: Wed, 6 May 2026 11:19:14 +0200 Subject: [PATCH] nbgl: align review-light final page vertical centering with reviews In addContent() (lib_nbgl/src/nbgl_page.c), every content type that places content from the top of the main container inserts an empty top spacer of SMALL_CENTERING_HEADER when no real header is present (CENTERED_INFO, EXTENDED_CENTER, TAG_VALUE_LIST, TAG_VALUE_DETAILS, TAG_VALUE_CONFIRM) - except INFO_BUTTON. The empty header (a) shifts the main container's top down by SMALL_CENTERING_HEADER and (b) shrinks its height by the same amount; for a CENTER-aligned child the net effect is to move it down by SMALL_CENTERING_HEADER / 2 px. As a result, the final confirmation page of nbgl_useCaseReviewLight rendered its centered pictogram + title ~16/20/12 px (Stax/Flex/Apex) higher than the review's first page (EXTENDED_CENTER), producing a visible discontinuity. Apply the same `if (!headerAdded) addEmptyHeader(layout, SMALL_CENTERING_HEADER);` guard to the INFO_BUTTON case so the first and final pages of a review-light flow share the same vertical layout. Co-Authored-By: Claude Opus 4.7 (1M context) --- lib_nbgl/src/nbgl_page.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib_nbgl/src/nbgl_page.c b/lib_nbgl/src/nbgl_page.c index 804cc7778..0f3de8054 100644 --- a/lib_nbgl/src/nbgl_page.c +++ b/lib_nbgl/src/nbgl_page.c @@ -70,6 +70,10 @@ static void addContent(nbgl_pageContent_t *content, nbgl_contentCenter_t centeredInfo = {0}; nbgl_layoutButton_t buttonInfo; + if (!headerAdded) { + addEmptyHeader(layout, SMALL_CENTERING_HEADER); + } + centeredInfo.icon = content->infoButton.icon; centeredInfo.title = content->infoButton.text; centeredInfo.illustrType = ICON_ILLUSTRATION;