From 23940bff8117c1ed4ac1446d34b390abe997a22a Mon Sep 17 00:00:00 2001 From: gornekich Date: Mon, 25 Mar 2024 06:36:17 +0000 Subject: [PATCH] [FL-3796], [FL-3795] NFC UI fixes (#3532) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * nfc app: fix navigation in select protocol scene * nfc app: fix text box position and size on emulation screen Co-authored-by: あく --- .../main/nfc/helpers/protocol_support/nfc_protocol_support.c | 2 +- applications/main/nfc/scenes/nfc_scene_select_protocol.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/applications/main/nfc/helpers/protocol_support/nfc_protocol_support.c b/applications/main/nfc/helpers/protocol_support/nfc_protocol_support.c index 80fbb63de..2ba5c65ba 100644 --- a/applications/main/nfc/helpers/protocol_support/nfc_protocol_support.c +++ b/applications/main/nfc/helpers/protocol_support/nfc_protocol_support.c @@ -600,7 +600,7 @@ static void nfc_protocol_support_scene_emulate_on_enter(NfcApp* instance) { } widget_add_text_box_element( - widget, 56, 33, 71, 25, AlignCenter, AlignTop, furi_string_get_cstr(temp_str), false); + widget, 50, 33, 78, 31, AlignCenter, AlignTop, furi_string_get_cstr(temp_str), false); furi_string_free(temp_str); diff --git a/applications/main/nfc/scenes/nfc_scene_select_protocol.c b/applications/main/nfc/scenes/nfc_scene_select_protocol.c index 52b2664ec..af644035e 100644 --- a/applications/main/nfc/scenes/nfc_scene_select_protocol.c +++ b/applications/main/nfc/scenes/nfc_scene_select_protocol.c @@ -57,6 +57,11 @@ bool nfc_scene_select_protocol_on_event(void* context, SceneManagerEvent event) scene_manager_set_scene_state( instance->scene_manager, NfcSceneSelectProtocol, event.event); consumed = true; + } else if(event.type == SceneManagerEventTypeBack) { + if(scene_manager_has_previous_scene(instance->scene_manager, NfcSceneDetect)) { + consumed = scene_manager_search_and_switch_to_previous_scene( + instance->scene_manager, NfcSceneStart); + } } return consumed; }