From f21ade2ac40491f9f26d954a1c4765ece838f591 Mon Sep 17 00:00:00 2001 From: Nicolas Roggeman Date: Tue, 22 Oct 2024 14:08:22 +0200 Subject: [PATCH] Minor fixes in infos-list with alias display (touchable area, icon, tune) --- lib_nbgl/src/nbgl_layout.c | 11 ++++++----- lib_nbgl/src/nbgl_use_case.c | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib_nbgl/src/nbgl_layout.c b/lib_nbgl/src/nbgl_layout.c index fdfd8914a..6d0907d0d 100644 --- a/lib_nbgl/src/nbgl_layout.c +++ b/lib_nbgl/src/nbgl_layout.c @@ -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++; diff --git a/lib_nbgl/src/nbgl_use_case.c b/lib_nbgl/src/nbgl_use_case.c index 33c20abe1..e241fb015 100644 --- a/lib_nbgl/src/nbgl_use_case.c +++ b/lib_nbgl/src/nbgl_use_case.c @@ -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);