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:
parent
adc3e9fe1b
commit
fef181a66f
5 changed files with 235 additions and 65 deletions
|
@ -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)
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue