Fix unaligned close button in tab bar
Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
parent
90f4c70a82
commit
b9be2147e8
5 changed files with 9 additions and 7 deletions
|
@ -48,7 +48,9 @@ impl Tab {
|
|||
}
|
||||
}
|
||||
|
||||
pub const HEIGHT_IN_REMS: f32 = 30. / 16.;
|
||||
pub const CONTAINER_HEIGHT_IN_REMS: f32 = 29. / 16.;
|
||||
|
||||
const CONTENT_HEIGHT_IN_REMS: f32 = 28. / 16.;
|
||||
|
||||
pub fn position(mut self, position: TabPosition) -> Self {
|
||||
self.position = position;
|
||||
|
@ -111,7 +113,7 @@ impl RenderOnce for Tab {
|
|||
};
|
||||
|
||||
self.div
|
||||
.h(rems(Self::HEIGHT_IN_REMS))
|
||||
.h(rems(Self::CONTAINER_HEIGHT_IN_REMS))
|
||||
.bg(tab_bg)
|
||||
.border_color(cx.theme().colors().border)
|
||||
.map(|this| match self.position {
|
||||
|
@ -138,7 +140,7 @@ impl RenderOnce for Tab {
|
|||
h_flex()
|
||||
.group("")
|
||||
.relative()
|
||||
.h_full()
|
||||
.h(rems(Self::CONTENT_HEIGHT_IN_REMS))
|
||||
.px_5()
|
||||
.gap_1()
|
||||
.text_color(text_color)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue