@@ -544,6 +544,32 @@ impl PickerDelegate for RecentProjectsDelegate {
544544 paths,
545545 } ;
546546
547+ let secondary_actions = h_flex ( )
548+ . gap_px ( )
549+ . child (
550+ IconButton :: new ( "open_new_window" , IconName :: ArrowUpRight )
551+ . icon_size ( IconSize :: XSmall )
552+ . tooltip ( Tooltip :: text ( "Open Project in New Window" ) )
553+ . on_click ( cx. listener ( move |this, _event, window, cx| {
554+ cx. stop_propagation ( ) ;
555+ window. prevent_default ( ) ;
556+ this. delegate . set_selected_index ( ix, window, cx) ;
557+ this. delegate . confirm ( true , window, cx) ;
558+ } ) ) ,
559+ )
560+ . child (
561+ IconButton :: new ( "delete" , IconName :: Close )
562+ . icon_size ( IconSize :: Small )
563+ . tooltip ( Tooltip :: text ( "Delete from Recent Projects" ) )
564+ . on_click ( cx. listener ( move |this, _event, window, cx| {
565+ cx. stop_propagation ( ) ;
566+ window. prevent_default ( ) ;
567+
568+ this. delegate . delete_recent_project ( ix, window, cx)
569+ } ) ) ,
570+ )
571+ . into_any_element ( ) ;
572+
547573 Some (
548574 ListItem :: new ( ix)
549575 . toggle_state ( selected)
@@ -577,24 +603,10 @@ impl PickerDelegate for RecentProjectsDelegate {
577603 } ) ,
578604 )
579605 . map ( |el| {
580- let delete_button = div ( )
581- . child (
582- IconButton :: new ( "delete" , IconName :: Close )
583- . icon_size ( IconSize :: Small )
584- . on_click ( cx. listener ( move |this, _event, window, cx| {
585- cx. stop_propagation ( ) ;
586- window. prevent_default ( ) ;
587-
588- this. delegate . delete_recent_project ( ix, window, cx)
589- } ) )
590- . tooltip ( Tooltip :: text ( "Delete from Recent Projects..." ) ) ,
591- )
592- . into_any_element ( ) ;
593-
594606 if self . selected_index ( ) == ix {
595- el. end_slot :: < AnyElement > ( delete_button )
607+ el. end_slot ( secondary_actions )
596608 } else {
597- el. end_hover_slot :: < AnyElement > ( delete_button )
609+ el. end_hover_slot ( secondary_actions )
598610 }
599611 } )
600612 . tooltip ( move |_, cx| {
0 commit comments