1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 23:21:08 +03:00

use titlebar bg for right status background

We were using the tab background, which is a bit awkward.

refs: https://github.com/wez/wezterm/issues/2356
This commit is contained in:
Wez Furlong 2022-08-04 20:45:05 -07:00
parent d5b910abed
commit 1212865974

View File

@ -490,6 +490,21 @@ impl super::TermWindow {
let mut left_eles = vec![];
let mut right_eles = vec![];
let bar_colors = ElementColors {
border: BorderColor::default(),
bg: rgbcolor_to_window_color(if self.focused.is_some() {
self.config.window_frame.active_titlebar_bg
} else {
self.config.window_frame.inactive_titlebar_bg
})
.into(),
text: rgbcolor_to_window_color(if self.focused.is_some() {
self.config.window_frame.active_titlebar_fg
} else {
self.config.window_frame.inactive_titlebar_fg
})
.into(),
};
let item_to_elem = |item: &TabEntry| -> Element {
let element = Element::with_line(&font, &item.title, palette);
@ -526,11 +541,7 @@ impl super::TermWindow {
bottom: Dimension::Cells(0.),
})
.border(BoxDimension::new(Dimension::Pixels(0.)))
.colors(ElementColors {
border: BorderColor::default(),
bg: colors.inactive_tab.bg_color.to_linear().into(),
text: colors.inactive_tab.fg_color.to_linear().into(),
}),
.colors(bar_colors.clone()),
TabBarItem::NewTabButton => Element::new(
&font,
ElementContent::Poly {
@ -763,22 +774,6 @@ impl super::TermWindow {
}
}
let bar_colors = ElementColors {
border: BorderColor::default(),
bg: rgbcolor_to_window_color(if self.focused.is_some() {
self.config.window_frame.active_titlebar_bg
} else {
self.config.window_frame.inactive_titlebar_bg
})
.into(),
text: rgbcolor_to_window_color(if self.focused.is_some() {
self.config.window_frame.active_titlebar_fg
} else {
self.config.window_frame.inactive_titlebar_fg
})
.into(),
};
let left_ele = Element::new(&font, ElementContent::Children(left_eles))
.vertical_align(VerticalAlign::Bottom)
.colors(bar_colors.clone())