Kaynağa Gözat

[FL-2668] GUI message screens update #1428

Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
Nikolay Minaylov 3 yıl önce
ebeveyn
işleme
f5d6a8084b

+ 9 - 7
applications/bad_usb/scenes/bad_usb_scene_error.c

@@ -27,20 +27,22 @@ void bad_usb_scene_error_on_enter(void* context) {
             AlignTop,
             AlignTop,
             FontSecondary,
             FontSecondary,
             "No SD card or\napp data found.\nThis app will not\nwork without\nrequired files.");
             "No SD card or\napp data found.\nThis app will not\nwork without\nrequired files.");
+        widget_add_button_element(
+            app->widget, GuiButtonTypeLeft, "Back", bad_usb_scene_error_event_callback, app);
     } else if(app->error == BadUsbAppErrorCloseRpc) {
     } else if(app->error == BadUsbAppErrorCloseRpc) {
+        widget_add_icon_element(app->widget, 78, 0, &I_ActiveConnection_50x64);
+        widget_add_string_multiline_element(
+            app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "Connection\nis active!");
         widget_add_string_multiline_element(
         widget_add_string_multiline_element(
             app->widget,
             app->widget,
-            63,
-            10,
-            AlignCenter,
+            3,
+            30,
+            AlignLeft,
             AlignTop,
             AlignTop,
             FontSecondary,
             FontSecondary,
-            "Disconnect from\ncompanion app\nto use this function");
+            "Disconnect from\nPC or phone to\nuse this function.");
     }
     }
 
 
-    widget_add_button_element(
-        app->widget, GuiButtonTypeLeft, "Back", bad_usb_scene_error_event_callback, app);
-
     view_dispatcher_switch_to_view(app->view_dispatcher, BadUsbAppViewError);
     view_dispatcher_switch_to_view(app->view_dispatcher, BadUsbAppViewError);
 }
 }
 
 

+ 7 - 19
applications/gpio/scenes/gpio_scene_usb_uart_close_rpc.c

@@ -1,32 +1,20 @@
 #include "../gpio_app_i.h"
 #include "../gpio_app_i.h"
 #include "../gpio_custom_event.h"
 #include "../gpio_custom_event.h"
 
 
-static void gpio_scene_usb_uart_close_rpc_event_callback(
-    GuiButtonType result,
-    InputType type,
-    void* context) {
-    furi_assert(context);
-    GpioApp* app = context;
-
-    if((result == GuiButtonTypeLeft) && (type == InputTypeShort)) {
-        view_dispatcher_send_custom_event(app->view_dispatcher, GpioCustomEventErrorBack);
-    }
-}
-
 void gpio_scene_usb_uart_close_rpc_on_enter(void* context) {
 void gpio_scene_usb_uart_close_rpc_on_enter(void* context) {
     GpioApp* app = context;
     GpioApp* app = context;
 
 
+    widget_add_icon_element(app->widget, 78, 0, &I_ActiveConnection_50x64);
+    widget_add_string_multiline_element(
+        app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "Connection\nis active!");
     widget_add_string_multiline_element(
     widget_add_string_multiline_element(
         app->widget,
         app->widget,
-        63,
-        10,
-        AlignCenter,
+        3,
+        30,
+        AlignLeft,
         AlignTop,
         AlignTop,
         FontSecondary,
         FontSecondary,
-        "Disconnect from\ncompanion app\nto use this function");
-
-    widget_add_button_element(
-        app->widget, GuiButtonTypeLeft, "Back", gpio_scene_usb_uart_close_rpc_event_callback, app);
+        "Disconnect from\nPC or phone to\nuse this function.");
 
 
     view_dispatcher_switch_to_view(app->view_dispatcher, GpioAppViewUsbUartCloseRpc);
     view_dispatcher_switch_to_view(app->view_dispatcher, GpioAppViewUsbUartCloseRpc);
 }
 }

+ 6 - 6
applications/lfrfid/scene/lfrfid_app_scene_write.cpp

@@ -41,13 +41,13 @@ bool LfRfidAppSceneWrite::on_event(LfRfidApp* app, LfRfidApp::Event* event) {
         case RfidWorker::WriteResult::NotWritable:
         case RfidWorker::WriteResult::NotWritable:
             if(!card_not_supported) {
             if(!card_not_supported) {
                 auto popup = app->view_controller.get<PopupVM>();
                 auto popup = app->view_controller.get<PopupVM>();
-                popup->set_icon(0, 0, NULL);
-                popup->set_header("Still trying to write", 64, 7, AlignCenter, AlignTop);
+                popup->set_icon(72, 14, &I_DolphinFirstStart8_56x51);
+                popup->set_header("Still trying to write...", 64, 3, AlignCenter, AlignTop);
                 popup->set_text(
                 popup->set_text(
-                    "This card may be protected\nor does not support this\ntype of writing",
-                    64,
-                    23,
-                    AlignCenter,
+                    "Make sure this\ncard is writable\nand not\nprotected.",
+                    3,
+                    17,
+                    AlignLeft,
                     AlignTop);
                     AlignTop);
                 card_not_supported = true;
                 card_not_supported = true;
             }
             }

+ 3 - 7
applications/storage_settings/scenes/storage_settings_scene_benchmark.c

@@ -122,14 +122,10 @@ void storage_settings_scene_benchmark_on_enter(void* context) {
     view_dispatcher_switch_to_view(app->view_dispatcher, StorageSettingsViewDialogEx);
     view_dispatcher_switch_to_view(app->view_dispatcher, StorageSettingsViewDialogEx);
 
 
     if(sd_status != FSE_OK) {
     if(sd_status != FSE_OK) {
-        dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 10, AlignCenter, AlignCenter);
+        dialog_ex_set_icon(dialog_ex, 72, 14, &I_DolphinFirstStart8_56x51);
+        dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 3, AlignCenter, AlignTop);
         dialog_ex_set_text(
         dialog_ex_set_text(
-            dialog_ex,
-            "If an SD card is inserted,\r\npull it out and reinsert it",
-            64,
-            32,
-            AlignCenter,
-            AlignCenter);
+            dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop);
         dialog_ex_set_center_button_text(dialog_ex, "Ok");
         dialog_ex_set_center_button_text(dialog_ex, "Ok");
     } else {
     } else {
         storage_settings_scene_benchmark(app);
         storage_settings_scene_benchmark(app);

+ 3 - 7
applications/storage_settings/scenes/storage_settings_scene_format_confirm.c

@@ -14,14 +14,10 @@ void storage_settings_scene_format_confirm_on_enter(void* context) {
     FS_Error sd_status = storage_sd_status(app->fs_api);
     FS_Error sd_status = storage_sd_status(app->fs_api);
 
 
     if(sd_status == FSE_NOT_READY) {
     if(sd_status == FSE_NOT_READY) {
-        dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 10, AlignCenter, AlignCenter);
+        dialog_ex_set_icon(dialog_ex, 72, 14, &I_DolphinFirstStart8_56x51);
+        dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 3, AlignCenter, AlignTop);
         dialog_ex_set_text(
         dialog_ex_set_text(
-            dialog_ex,
-            "If an SD card is inserted,\r\npull it out and reinsert it",
-            64,
-            32,
-            AlignCenter,
-            AlignCenter);
+            dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop);
         dialog_ex_set_center_button_text(dialog_ex, "Ok");
         dialog_ex_set_center_button_text(dialog_ex, "Ok");
     } else {
     } else {
         dialog_ex_set_header(dialog_ex, "Format SD card?", 64, 10, AlignCenter, AlignCenter);
         dialog_ex_set_header(dialog_ex, "Format SD card?", 64, 10, AlignCenter, AlignCenter);

+ 2 - 1
applications/storage_settings/scenes/storage_settings_scene_formatting.c

@@ -47,7 +47,8 @@ void storage_settings_scene_formatting_on_enter(void* context) {
         dialog_ex_set_text(
         dialog_ex_set_text(
             dialog_ex, storage_error_get_desc(error), 64, 32, AlignCenter, AlignCenter);
             dialog_ex, storage_error_get_desc(error), 64, 32, AlignCenter, AlignCenter);
     } else {
     } else {
-        dialog_ex_set_header(dialog_ex, "Format complete!", 64, 32, AlignCenter, AlignCenter);
+        dialog_ex_set_icon(dialog_ex, 72, 14, &I_DolphinFirstStart8_56x51);
+        dialog_ex_set_header(dialog_ex, "Format\ncomplete!", 14, 15, AlignLeft, AlignTop);
     }
     }
     dialog_ex_set_center_button_text(dialog_ex, "OK");
     dialog_ex_set_center_button_text(dialog_ex, "OK");
 }
 }

+ 3 - 7
applications/storage_settings/scenes/storage_settings_scene_sd_info.c

@@ -18,14 +18,10 @@ void storage_settings_scene_sd_info_on_enter(void* context) {
     dialog_ex_set_result_callback(dialog_ex, storage_settings_scene_sd_info_dialog_callback);
     dialog_ex_set_result_callback(dialog_ex, storage_settings_scene_sd_info_dialog_callback);
 
 
     if(sd_status != FSE_OK) {
     if(sd_status != FSE_OK) {
-        dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 10, AlignCenter, AlignCenter);
+        dialog_ex_set_icon(dialog_ex, 72, 14, &I_DolphinFirstStart8_56x51);
+        dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 3, AlignCenter, AlignTop);
         dialog_ex_set_text(
         dialog_ex_set_text(
-            dialog_ex,
-            "If an SD card is inserted,\r\npull it out and reinsert it",
-            64,
-            32,
-            AlignCenter,
-            AlignCenter);
+            dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop);
         dialog_ex_set_center_button_text(dialog_ex, "Ok");
         dialog_ex_set_center_button_text(dialog_ex, "Ok");
     } else {
     } else {
         string_printf(
         string_printf(

+ 4 - 8
applications/storage_settings/scenes/storage_settings_scene_unmount_confirm.c

@@ -14,15 +14,11 @@ void storage_settings_scene_unmount_confirm_on_enter(void* context) {
     FS_Error sd_status = storage_sd_status(app->fs_api);
     FS_Error sd_status = storage_sd_status(app->fs_api);
 
 
     if(sd_status == FSE_NOT_READY) {
     if(sd_status == FSE_NOT_READY) {
-        dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 10, AlignCenter, AlignCenter);
+        dialog_ex_set_icon(dialog_ex, 72, 14, &I_DolphinFirstStart8_56x51);
+        dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 3, AlignCenter, AlignTop);
         dialog_ex_set_text(
         dialog_ex_set_text(
-            dialog_ex,
-            "If an SD card is inserted,\r\npull it out and reinsert it",
-            64,
-            32,
-            AlignCenter,
-            AlignCenter);
-        dialog_ex_set_center_button_text(dialog_ex, "OK");
+            dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop);
+        dialog_ex_set_center_button_text(dialog_ex, "Ok");
     } else {
     } else {
         dialog_ex_set_header(dialog_ex, "Unmount SD card?", 64, 10, AlignCenter, AlignCenter);
         dialog_ex_set_header(dialog_ex, "Unmount SD card?", 64, 10, AlignCenter, AlignCenter);
         dialog_ex_set_text(
         dialog_ex_set_text(

+ 5 - 7
applications/storage_settings/scenes/storage_settings_scene_unmounted.c

@@ -13,17 +13,15 @@ void storage_settings_scene_unmounted_on_enter(void* context) {
     DialogEx* dialog_ex = app->dialog_ex;
     DialogEx* dialog_ex = app->dialog_ex;
 
 
     dialog_ex_set_center_button_text(dialog_ex, "OK");
     dialog_ex_set_center_button_text(dialog_ex, "OK");
+    dialog_ex_set_icon(dialog_ex, 72, 14, &I_DolphinFirstStart8_56x51);
 
 
     if(error == FSE_OK) {
     if(error == FSE_OK) {
-        dialog_ex_set_header(dialog_ex, "SD card unmounted", 64, 10, AlignCenter, AlignCenter);
-        dialog_ex_set_text(
-            dialog_ex, "Now the SD card\ncan be removed.", 64, 32, AlignCenter, AlignCenter);
+        dialog_ex_set_header(dialog_ex, "SD card unmounted", 64, 3, AlignCenter, AlignTop);
+        dialog_ex_set_text(dialog_ex, "You can remove\nSD card now.", 3, 22, AlignLeft, AlignTop);
         notification_message(app->notification, &sequence_blink_green_100);
         notification_message(app->notification, &sequence_blink_green_100);
     } else {
     } else {
-        dialog_ex_set_header(
-            dialog_ex, "Cannot unmount SD Card", 64, 10, AlignCenter, AlignCenter);
-        dialog_ex_set_text(
-            dialog_ex, storage_error_get_desc(error), 64, 32, AlignCenter, AlignCenter);
+        dialog_ex_set_header(dialog_ex, "Cannot unmount SD Card", 64, 3, AlignCenter, AlignTop);
+        dialog_ex_set_text(dialog_ex, storage_error_get_desc(error), 3, 22, AlignLeft, AlignTop);
         notification_message(app->notification, &sequence_blink_red_100);
         notification_message(app->notification, &sequence_blink_red_100);
     }
     }
 
 

+ 1 - 1
applications/subghz/scenes/subghz_scene_set_type.c

@@ -26,7 +26,7 @@ bool subghz_scene_set_type_submenu_gen_data_protocol(
         subghz_receiver_search_decoder_base_by_name(subghz->txrx->receiver, protocol_name);
         subghz_receiver_search_decoder_base_by_name(subghz->txrx->receiver, protocol_name);
 
 
     if(subghz->txrx->decoder_result == NULL) {
     if(subghz->txrx->decoder_result == NULL) {
-        string_set_str(subghz->error_str, "Protocol not found");
+        string_set_str(subghz->error_str, "Protocol not\nfound!");
         scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowErrorSub);
         scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowErrorSub);
         return false;
         return false;
     }
     }

+ 2 - 2
applications/subghz/scenes/subghz_scene_show_error_sub.c

@@ -11,8 +11,8 @@ void subghz_scene_show_error_sub_on_enter(void* context) {
 
 
     // Setup view
     // Setup view
     Popup* popup = subghz->popup;
     Popup* popup = subghz->popup;
-    popup_set_icon(popup, 32, 12, &I_DolphinFirstStart7_61x51);
-    popup_set_header(popup, string_get_cstr(subghz->error_str), 64, 8, AlignCenter, AlignBottom);
+    popup_set_icon(popup, 72, 14, &I_DolphinFirstStart8_56x51);
+    popup_set_header(popup, string_get_cstr(subghz->error_str), 14, 15, AlignLeft, AlignTop);
     popup_set_timeout(popup, 1500);
     popup_set_timeout(popup, 1500);
     popup_set_context(popup, subghz);
     popup_set_context(popup, subghz);
     popup_set_callback(popup, subghz_scene_show_error_sub_popup_callback);
     popup_set_callback(popup, subghz_scene_show_error_sub_popup_callback);

+ 1 - 1
applications/subghz/scenes/subghz_scene_transmitter.c

@@ -94,7 +94,7 @@ bool subghz_scene_transmitter_on_event(void* context, SceneManagerEvent event) {
                 subghz->scene_manager, SubGhzSceneStart);
                 subghz->scene_manager, SubGhzSceneStart);
             return true;
             return true;
         } else if(event.event == SubGhzCustomEventViewTransmitterError) {
         } else if(event.event == SubGhzCustomEventViewTransmitterError) {
-            string_set_str(subghz->error_str, "Protocol not found");
+            string_set_str(subghz->error_str, "Protocol not\nfound!");
             scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowErrorSub);
             scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowErrorSub);
         }
         }
     } else if(event.type == SceneManagerEventTypeTick) {
     } else if(event.type == SceneManagerEventTypeTick) {

+ 11 - 7
applications/subghz/subghz_i.c

@@ -205,15 +205,19 @@ void subghz_tx_stop(SubGhz* subghz) {
 void subghz_dialog_message_show_only_rx(SubGhz* subghz) {
 void subghz_dialog_message_show_only_rx(SubGhz* subghz) {
     DialogsApp* dialogs = subghz->dialogs;
     DialogsApp* dialogs = subghz->dialogs;
     DialogMessage* message = dialog_message_alloc();
     DialogMessage* message = dialog_message_alloc();
+
+    dialog_message_set_header(message, "Transmission is blocked", 63, 3, AlignCenter, AlignTop);
+
     dialog_message_set_text(
     dialog_message_set_text(
         message,
         message,
-        "This frequency can\nonly be used for RX\nin your region",
-        38,
-        23,
-        AlignCenter,
-        AlignCenter);
-    dialog_message_set_icon(message, &I_DolphinFirstStart7_61x51, 67, 12);
-    dialog_message_set_buttons(message, "Back", NULL, NULL);
+        "This frequency\nis restricted to\nreceiving only\nin your region.",
+        3,
+        17,
+        AlignLeft,
+        AlignTop);
+
+    dialog_message_set_icon(message, &I_DolphinFirstStart8_56x51, 72, 14);
+
     dialog_message_show(dialogs, message);
     dialog_message_show(dialogs, message);
     dialog_message_free(message);
     dialog_message_free(message);
 }
 }

+ 9 - 7
applications/u2f/scenes/u2f_scene_error.c

@@ -22,20 +22,22 @@ void u2f_scene_error_on_enter(void* context) {
             AlignTop,
             AlignTop,
             FontSecondary,
             FontSecondary,
             "No SD card or\napp data found.\nThis app will not\nwork without\nrequired files.");
             "No SD card or\napp data found.\nThis app will not\nwork without\nrequired files.");
+        widget_add_button_element(
+            app->widget, GuiButtonTypeLeft, "Back", u2f_scene_error_event_callback, app);
     } else if(app->error == U2fAppErrorCloseRpc) {
     } else if(app->error == U2fAppErrorCloseRpc) {
+        widget_add_icon_element(app->widget, 78, 0, &I_ActiveConnection_50x64);
+        widget_add_string_multiline_element(
+            app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "Connection\nis active!");
         widget_add_string_multiline_element(
         widget_add_string_multiline_element(
             app->widget,
             app->widget,
-            63,
-            10,
-            AlignCenter,
+            3,
+            30,
+            AlignLeft,
             AlignTop,
             AlignTop,
             FontSecondary,
             FontSecondary,
-            "Disconnect from\ncompanion app\nto use this function");
+            "Disconnect from\nPC or phone to\nuse this function.");
     }
     }
 
 
-    widget_add_button_element(
-        app->widget, GuiButtonTypeLeft, "Back", u2f_scene_error_event_callback, app);
-
     view_dispatcher_switch_to_view(app->view_dispatcher, U2fAppViewError);
     view_dispatcher_switch_to_view(app->view_dispatcher, U2fAppViewError);
 }
 }
 
 

BIN
assets/icons/Common/ActiveConnection_50x64.png