Commit 4945481 1 parent cac66ba commit 4945481 Copy full SHA for 4945481
File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1935,7 +1935,9 @@ impl Pane {
1935
1935
} ;
1936
1936
1937
1937
let icon = item. tab_icon ( cx) ;
1938
- let close_side = & ItemSettings :: get_global ( cx) . close_position ;
1938
+ let settings = ItemSettings :: get_global ( cx) ;
1939
+ let close_side = & settings. close_position ;
1940
+ let always_show_close_button = settings. always_show_close_button ;
1939
1941
let indicator = render_item_indicator ( item. boxed_clone ( ) , cx) ;
1940
1942
let item_id = item. item_id ( ) ;
1941
1943
let is_first_item = ix == 0 ;
@@ -2030,7 +2032,9 @@ impl Pane {
2030
2032
end_slot_action = & CloseActiveItem { save_intent : None } ;
2031
2033
end_slot_tooltip_text = "Close Tab" ;
2032
2034
IconButton :: new ( "close tab" , IconName :: Close )
2033
- . visible_on_hover ( "" )
2035
+ . when ( !always_show_close_button, |button| {
2036
+ button. visible_on_hover ( "" )
2037
+ } )
2034
2038
. shape ( IconButtonShape :: Square )
2035
2039
. icon_color ( Color :: Muted )
2036
2040
. size ( ButtonSize :: None )
You can’t perform that action at this time.
0 commit comments