Skip to content

Commit

Permalink
Merge pull request #813 from LedgerHQ/minor-fix-in-info-list-with-alias
Browse files Browse the repository at this point in the history
Minor fixes in infos-list with alias display (touchable area, icon, tune)
  • Loading branch information
nroggeman-ledger authored Oct 23, 2024
2 parents afadb33 + f21ade2 commit 0aad933
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions lib_nbgl/src/nbgl_layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,16 +922,17 @@ static int addText(nbgl_layout_t *layout,
container->nbChildren++;
if (withAlias == true) {
nbgl_image_t *image = (nbgl_image_t *) nbgl_objPoolGet(IMAGE, layoutInt->layer);
layoutObj_t *obj
= layoutAddCallbackObj(layoutInt, (nbgl_obj_t *) image, token, TUNE_TAP_CASUAL);
// the whole container is touchable
layoutObj_t *obj
= layoutAddCallbackObj(layoutInt, (nbgl_obj_t *) container, token, TUNE_TAP_CASUAL);
obj->index = index;
image->foregroundColor = BLACK;
image->buffer = &MINI_PUSH_ICON;
image->buffer = &PUSH_ICON;
image->obj.alignment = RIGHT_TOP;
image->obj.alignmentMarginX = 12;
image->obj.alignTo = (nbgl_obj_t *) textArea;
image->obj.touchMask = (1 << TOUCHED);
image->obj.touchId = VALUE_BUTTON_1_ID + index;
container->obj.touchMask = (1 << TOUCHED);
container->obj.touchId = VALUE_BUTTON_1_ID + index;

container->children[container->nbChildren] = (nbgl_obj_t *) image;
container->nbChildren++;
Expand Down
3 changes: 2 additions & 1 deletion lib_nbgl/src/nbgl_use_case.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,8 @@ static void displayTipBoxModal(void)
.infosList.infoExtensions = tipBoxInfoList.infoExtensions,
.infosList.token = INFO_ALIAS_TOKEN,
.title = tipBoxModalTitle,
.titleToken = QUIT_TOKEN};
.titleToken = QUIT_TOKEN,
.tuneId = TUNE_TAP_CASUAL};

if (modalPageContext != NULL) {
nbgl_pageRelease(modalPageContext);
Expand Down

0 comments on commit 0aad933

Please sign in to comment.