Fix inactive tab styles (the verbose way) (#3591)
This PR fixes the inactive tab style to properly show the label using the muted text color. I went about fixing this in the most direct way possible, but the solution leaves a lot to be desired, IMO. I plan to explore some ideas on how we can improve the state of styling the tab content without having the same styles repeated all over the place and subsequently out-of-sync. Release Notes: - N/A
This commit is contained in:
parent
fcbc18a380
commit
f02a3e8c68
9 changed files with 108 additions and 59 deletions
|
@ -686,13 +686,22 @@ impl Item for TerminalView {
|
|||
Some(self.terminal().read(cx).title().into())
|
||||
}
|
||||
|
||||
fn tab_content(&self, _detail: Option<usize>, cx: &WindowContext) -> AnyElement {
|
||||
fn tab_content(
|
||||
&self,
|
||||
_detail: Option<usize>,
|
||||
selected: bool,
|
||||
cx: &WindowContext,
|
||||
) -> AnyElement {
|
||||
let title = self.terminal().read(cx).title();
|
||||
|
||||
h_stack()
|
||||
.gap_2()
|
||||
.child(IconElement::new(Icon::Terminal))
|
||||
.child(Label::new(title))
|
||||
.child(Label::new(title).color(if selected {
|
||||
Color::Default
|
||||
} else {
|
||||
Color::Muted
|
||||
}))
|
||||
.into_any()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue