Skip to content

Commit

Permalink
Merge pull request #765 from LedgerHQ/cev/update_api_level_21
Browse files Browse the repository at this point in the history
Cherry-pick nbgl updates
  • Loading branch information
cedelavergne-ledger authored Sep 9, 2024
2 parents 8706d88 + 8262712 commit d88d4db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib_nbgl/include/nbgl_use_case.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ extern "C" {
* @brief maximum number of lines for value field in review pages
*/
#ifdef TARGET_STAX
#define NB_MAX_LINES_IN_REVIEW 11
#else // TARGET_STAX
#define NB_MAX_LINES_IN_REVIEW 10
#else // TARGET_STAX
#define NB_MAX_LINES_IN_REVIEW 9
#endif // TARGET_STAX

/**
Expand Down
4 changes: 4 additions & 0 deletions lib_nbgl/src/nbgl_fonts.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,10 @@ bool nbgl_getTextMaxLenInNbLines(nbgl_font_id_e fontId,
// if \n, reset width
if (unicode == '\n') {
maxNbLines--;
// if last line is reached, let's rewind before carriage return
if (maxNbLines == 0) {
text--;
}
width = 0;
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion lib_nbgl/src/nbgl_use_case.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ static const char *getDetailsPageAt(uint8_t detailsPage)
AVAILABLE_WIDTH,
NB_MAX_LINES_IN_DETAILS,
&len,
false);
detailsContext.wrapping);
len -= 3;
currentChar = currentChar + len;
}
Expand Down

0 comments on commit d88d4db

Please sign in to comment.