Update imports, tab height const

This commit is contained in:
Nate Butler 2023-12-19 11:03:08 -05:00
parent 286f654517
commit 30b01b9bc0
2 changed files with 6 additions and 9 deletions

View file

@ -3,8 +3,6 @@ use gpui::{AnyElement, IntoElement, Stateful};
use smallvec::SmallVec;
use std::cmp::Ordering;
pub const TAB_HEIGHT_IN_REMS: f32 = 30. / 16.;
/// The position of a [`Tab`] within a list of tabs.
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum TabPosition {
@ -50,6 +48,8 @@ impl Tab {
}
}
pub const HEIGHT_IN_REMS: f32 = 30. / 16.;
pub fn position(mut self, position: TabPosition) -> Self {
self.position = position;
self
@ -112,7 +112,7 @@ impl RenderOnce for Tab {
};
self.div
.h(rems(TAB_HEIGHT_IN_REMS))
.h(rems(Self::HEIGHT_IN_REMS))
.bg(tab_bg)
.border_color(cx.theme().colors().border)
.map(|this| match self.position {