Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update API_LEVEL_21 #764

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading