Pane: Add tab pinning (#17426)

Closes #5046

Release Notes:

- Added "Pin/Unpin Tab" action to the workspace, assistant and terminal
tabs.

---------

Co-authored-by: Danilo <danilo@zed.dev>
This commit is contained in:
Piotr Osiewicz 2024-09-05 18:53:55 +02:00 committed by GitHub
parent adc3e9fe1b
commit fef181a66f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 235 additions and 65 deletions

View file

@ -28,6 +28,7 @@ impl Render for TabStory {
Tab::new("tab_1")
.end_slot(
IconButton::new("close_button", IconName::Close)
.visible_on_hover("")
.shape(IconButtonShape::Square)
.icon_color(Color::Muted)
.size(ButtonSize::None)

View file

@ -120,11 +120,7 @@ impl RenderOnce for Tab {
let (start_slot, end_slot) = {
let start_slot = h_flex().size_3().justify_center().children(self.start_slot);
let end_slot = h_flex()
.size_3()
.justify_center()
.visible_on_hover("")
.children(self.end_slot);
let end_slot = h_flex().size_3().justify_center().children(self.end_slot);
match self.close_side {
TabCloseSide::End => (start_slot, end_slot),