mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-13 05:42:59 +00:00
Update tab close button
This commit is contained in:
parent
412c6157b1
commit
eed5a698cf
2 changed files with 6 additions and 35 deletions
|
@ -1421,13 +1421,12 @@ impl Pane {
|
||||||
let close_icon = || {
|
let close_icon = || {
|
||||||
let id = item.item_id();
|
let id = item.item_id();
|
||||||
|
|
||||||
div()
|
h_stack()
|
||||||
.id(ix)
|
.id(ix)
|
||||||
.w_3p5()
|
.justify_center()
|
||||||
.h_3p5()
|
.w_4()
|
||||||
.rounded_sm()
|
.h_4()
|
||||||
.border()
|
.rounded_md()
|
||||||
.border_color(cx.theme().colors().border_variant)
|
|
||||||
.absolute()
|
.absolute()
|
||||||
.map(|this| {
|
.map(|this| {
|
||||||
if close_right {
|
if close_right {
|
||||||
|
|
|
@ -87,35 +87,7 @@ impl Render for Toolbar {
|
||||||
.child(
|
.child(
|
||||||
h_stack()
|
h_stack()
|
||||||
.justify_between()
|
.justify_between()
|
||||||
// Toolbar left side
|
.children(self.items.iter().map(|(child, _)| child.to_any())),
|
||||||
.children(self.items.iter().map(|(child, _)| child.to_any()))
|
|
||||||
// Toolbar right side
|
|
||||||
.child(
|
|
||||||
h_stack()
|
|
||||||
.p_1()
|
|
||||||
.gap_2()
|
|
||||||
.child(
|
|
||||||
IconButton::new("toggle-inlay-hints", Icon::InlayHint)
|
|
||||||
.size(ui::ButtonSize::Compact)
|
|
||||||
.icon_size(ui::IconSize::Small)
|
|
||||||
.style(ui::ButtonStyle::Subtle)
|
|
||||||
.tooltip(move |cx| Tooltip::text("Inlay Hints", cx)),
|
|
||||||
)
|
|
||||||
.child(
|
|
||||||
IconButton::new("buffer-search", Icon::MagnifyingGlass)
|
|
||||||
.size(ui::ButtonSize::Compact)
|
|
||||||
.icon_size(ui::IconSize::Small)
|
|
||||||
.style(ui::ButtonStyle::Subtle)
|
|
||||||
.tooltip(move |cx| Tooltip::text("Search in File", cx)),
|
|
||||||
)
|
|
||||||
.child(
|
|
||||||
IconButton::new("inline-assist", Icon::MagicWand)
|
|
||||||
.size(ui::ButtonSize::Compact)
|
|
||||||
.icon_size(ui::IconSize::Small)
|
|
||||||
.style(ui::ButtonStyle::Subtle)
|
|
||||||
.tooltip(move |cx| Tooltip::text("Inline Assist", cx)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue