recent_projects: Fix unaligned keybinding labels in quick-switch menu (#54325)

galuis116 and Danilo Leal created

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #54324 

Release Notes:

- Fixed shortcut label alignment in the Recent Projects quick-switch
footer by rendering action rows with a consistent two-column layout
(label left, keybinding right) for “Add Local Folders” and “Add Remote
Folder”.

---------

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>

Change summary

crates/recent_projects/src/sidebar_recent_projects.rs | 36 +++++++++---
1 file changed, 25 insertions(+), 11 deletions(-)

Detailed changes

crates/recent_projects/src/sidebar_recent_projects.rs đź”—

@@ -12,7 +12,7 @@ use picker::{
 };
 use remote::RemoteConnectionOptions;
 use settings::Settings;
-use ui::{KeyBinding, ListItem, ListItemSpacing, Tooltip, prelude::*};
+use ui::{ButtonLike, KeyBinding, ListItem, ListItemSpacing, Tooltip, prelude::*};
 use ui_input::ErasedEditor;
 use util::{ResultExt, paths::PathExt};
 use workspace::{
@@ -417,22 +417,36 @@ impl PickerDelegate for SidebarRecentProjectsDelegate {
                         create_new_window: false,
                     };
 
-                    Button::new("open_local_folder", "Add Local Folders")
-                        .key_binding(KeyBinding::for_action_in(&open_action, &focus_handle, cx))
+                    ButtonLike::new("open_local_folder")
+                        .child(
+                            h_flex()
+                                .w_full()
+                                .gap_1()
+                                .justify_between()
+                                .child(Label::new("Add Local Folders"))
+                                .child(KeyBinding::for_action_in(&open_action, &focus_handle, cx)),
+                        )
                         .on_click(cx.listener(move |_, _, window, cx| {
                             window.dispatch_action(open_action.boxed_clone(), cx);
                             cx.emit(DismissEvent);
                         }))
                 })
                 .child(
-                    Button::new("open_remote_folder", "Add Remote Folder")
-                        .key_binding(KeyBinding::for_action(
-                            &OpenRemote {
-                                from_existing_connection: false,
-                                create_new_window: false,
-                            },
-                            cx,
-                        ))
+                    ButtonLike::new("open_remote_folder")
+                        .child(
+                            h_flex()
+                                .w_full()
+                                .gap_1()
+                                .justify_between()
+                                .child(Label::new("Add Remote Folder"))
+                                .child(KeyBinding::for_action(
+                                    &OpenRemote {
+                                        from_existing_connection: false,
+                                        create_new_window: false,
+                                    },
+                                    cx,
+                                )),
+                        )
                         .on_click(cx.listener(|_, _, window, cx| {
                             window.dispatch_action(
                                 OpenRemote {