Make tab bar visible

This commit is contained in:
Antonio Scandurra 2023-11-03 15:51:33 +01:00
parent 0b3c888acc
commit b21c25826d
2 changed files with 3 additions and 4 deletions

View file

@ -578,12 +578,12 @@ impl Item for Editor {
fn tab_content<T: 'static>(&self, detail: Option<usize>, cx: &AppContext) -> AnyElement<T> { fn tab_content<T: 'static>(&self, detail: Option<usize>, cx: &AppContext) -> AnyElement<T> {
let theme = cx.theme(); let theme = cx.theme();
AnyElement::new( AnyElement::new(
div() div()
.flex() .flex()
.flex_row() .flex_row()
.items_center() .items_center()
.bg(gpui::white())
.text_color(gpui::white()) .text_color(gpui::white())
.child(self.title(cx).to_string()) .child(self.title(cx).to_string())
.children(detail.and_then(|detail| { .children(detail.and_then(|detail| {
@ -625,8 +625,7 @@ impl Item for Editor {
fn deactivated(&mut self, cx: &mut ViewContext<Self>) { fn deactivated(&mut self, cx: &mut ViewContext<Self>) {
let selection = self.selections.newest_anchor(); let selection = self.selections.newest_anchor();
todo!() self.push_to_nav_history(selection.head(), None, cx);
// self.push_to_nav_history(selection.head(), None, cx);
} }
fn workspace_deactivated(&mut self, cx: &mut ViewContext<Self>) { fn workspace_deactivated(&mut self, cx: &mut ViewContext<Self>) {

View file

@ -1457,7 +1457,7 @@ impl Pane {
), ),
) )
.child( .child(
div().w_0().flex_1().h_full().child( div().flex_1().h_full().child(
div().id("tabs").flex().overflow_x_scroll().children( div().id("tabs").flex().overflow_x_scroll().children(
self.items self.items
.iter() .iter()