mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-09 21:26:14 +03:00
Remove padding from ButtonSize::None
(#3541)
This PR removes the padding from buttons when using `ButtonSize::None`. This fixes the size of the tab close buttons. Release Notes: - N/A
This commit is contained in:
parent
1fcd006b2a
commit
853daf953b
@ -342,7 +342,10 @@ impl RenderOnce for ButtonLike {
|
||||
.when_some(self.width, |this, width| this.w(width))
|
||||
.rounded_md()
|
||||
.gap_1()
|
||||
.px_1()
|
||||
.map(|this| match self.size {
|
||||
ButtonSize::Default | ButtonSize::Compact => this.px_1(),
|
||||
ButtonSize::None => this,
|
||||
})
|
||||
.bg(self.style.enabled(cx).background)
|
||||
.when(!self.disabled, |this| {
|
||||
this.cursor_pointer()
|
||||
|
@ -1481,7 +1481,6 @@ impl Pane {
|
||||
})
|
||||
.start_slot::<Indicator>(indicator)
|
||||
.end_slot(
|
||||
// TODO: Fix button size
|
||||
IconButton::new("close tab", Icon::Close)
|
||||
.icon_color(Color::Muted)
|
||||
.size(ButtonSize::None)
|
||||
|
Loading…
Reference in New Issue
Block a user