style(tree): improve ancestor contrast

pull/9/head
wongjiahau 2 years ago
parent 8ef95ee56a
commit d3db1b6204

@ -825,7 +825,14 @@ impl<T: TreeViewItem + Clone> TreeView<T> {
); );
} }
let ancestor_style = cx.editor.theme.get("ui.text.focus"); let ancestor_style = {
let style = cx.editor.theme.get("ui.selection");
let fg = cx.editor.theme.get("ui.text").fg;
match (style.fg, fg) {
(None, Some(fg)) => style.fg(fg),
_ => style,
}
};
let area = area.clip_top(2); let area = area.clip_top(2);
let iter = self.render_lines(area).into_iter().enumerate(); let iter = self.render_lines(area).into_iter().enumerate();

Loading…
Cancel
Save