Update tab borders
This commit is contained in:
parent
48a9f2be4c
commit
2e61a84bd6
1 changed files with 20 additions and 6 deletions
|
@ -1379,6 +1379,7 @@ impl Pane {
|
||||||
};
|
};
|
||||||
|
|
||||||
let close_right = ItemSettings::get_global(cx).close_position.right();
|
let close_right = ItemSettings::get_global(cx).close_position.right();
|
||||||
|
let is_active = ix == self.active_item_index;
|
||||||
|
|
||||||
div()
|
div()
|
||||||
.group("")
|
.group("")
|
||||||
|
@ -1406,12 +1407,25 @@ impl Pane {
|
||||||
})
|
})
|
||||||
.py_1()
|
.py_1()
|
||||||
.bg(tab_bg)
|
.bg(tab_bg)
|
||||||
.border_color(gpui::red())
|
.border_color(cx.theme().colors().border)
|
||||||
// .border_color(cx.theme().colors().border)
|
.text_color(if is_active {
|
||||||
.map(|this| match ix.cmp(&self.active_item_index) {
|
cx.theme().colors().text
|
||||||
cmp::Ordering::Less => this.border_l().mr_px(),
|
} else {
|
||||||
cmp::Ordering::Equal => this.border_r().ml_px(),
|
cx.theme().colors().text_muted
|
||||||
cmp::Ordering::Greater => this.border_l().border_r(),
|
})
|
||||||
|
.map(|this| {
|
||||||
|
let is_last_item = ix == self.items.len() - 1;
|
||||||
|
match ix.cmp(&self.active_item_index) {
|
||||||
|
cmp::Ordering::Less => this.border_l().mr_px(),
|
||||||
|
cmp::Ordering::Greater => {
|
||||||
|
if is_last_item {
|
||||||
|
this.mr_px().ml_px()
|
||||||
|
} else {
|
||||||
|
this.border_r().ml_px()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cmp::Ordering::Equal => this.border_l().border_r(),
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// .hover(|h| h.bg(tab_hover_bg))
|
// .hover(|h| h.bg(tab_hover_bg))
|
||||||
// .active(|a| a.bg(tab_active_bg))
|
// .active(|a| a.bg(tab_active_bg))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue