Skip to content

Commit 08ff25a

Browse files
Implement PR comments
1 parent 92c5339 commit 08ff25a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

lib_nbgl/src/nbgl_layout.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,10 +2169,12 @@ int nbgl_layoutAddTagValueList(nbgl_layout_t *layout, const nbgl_layoutTagValueL
21692169
* subtext if needed.
21702170
*
21712171
* @param layout the current layout
2172-
* @param text text to draw under the spinner
2172+
* @param text text to draw under the progress bar
21732173
* @param subText text to draw under the text (can be NULL)
2174-
* @param percentage initial percentage position, zero by default.
2175-
* @return - 2 partial color refresh needed
2174+
* @param percentage initial percentage position.
2175+
* @return - -1 An error occurred
2176+
* - 2 partial color refresh needed
2177+
*
21762178
*/
21772179
int nbgl_layoutAddProgressBar(nbgl_layout_t *layout,
21782180
const char *text,
@@ -2200,8 +2202,7 @@ int nbgl_layoutAddProgressBar(nbgl_layout_t *layout,
22002202
container->obj.alignment = CENTER;
22012203

22022204
// Create progressbar
2203-
progress = (nbgl_progress_bar_t *) nbgl_objPoolGet(PROGRESS_BAR,
2204-
((nbgl_layoutInternal_t *) layout)->layer);
2205+
progress = (nbgl_progress_bar_t *) nbgl_objPoolGet(PROGRESS_BAR, layoutInt->layer);
22052206
progress->foregroundColor = BLACK;
22062207
progress->withBorder = true;
22072208
progress->state = percentage;
@@ -2273,10 +2274,11 @@ int nbgl_layoutAddProgressBar(nbgl_layout_t *layout,
22732274
* @brief Update an existing progress Bar (must be the only object of the layout)
22742275
*
22752276
* @param layout the current layout
2276-
* @param text text to draw under the spinner
2277+
* @param text text to draw under the progress bar
22772278
* @param subText text to draw under the text (can be NULL)
22782279
* @param percentage progress bar percentage.
2279-
* @return - 0 if no refresh needed
2280+
* @return - -1 An error occurred
2281+
* - 0 if no refresh needed
22802282
* - 1 if partial B&W refresh needed
22812283
* - 2 if partial color refresh needed
22822284
*/

0 commit comments

Comments
 (0)