mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
project panel: adjust right border and make active entry more prominent when panel is not focused (#12420)
Release Notes: - N/A
This commit is contained in:
parent
ef58509797
commit
36d0b71f27
@ -1938,7 +1938,7 @@ impl ProjectPanel {
|
|||||||
ListItem::new(entry_id.to_proto() as usize)
|
ListItem::new(entry_id.to_proto() as usize)
|
||||||
.indent_level(depth)
|
.indent_level(depth)
|
||||||
.indent_step_size(px(settings.indent_size))
|
.indent_step_size(px(settings.indent_size))
|
||||||
.selected(is_marked)
|
.selected(is_marked || is_active)
|
||||||
.when_some(canonical_path, |this, path| {
|
.when_some(canonical_path, |this, path| {
|
||||||
this.end_slot::<AnyElement>(
|
this.end_slot::<AnyElement>(
|
||||||
div()
|
div()
|
||||||
@ -2052,17 +2052,20 @@ impl ProjectPanel {
|
|||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
.border_1()
|
.border_1()
|
||||||
|
.border_r_2()
|
||||||
.rounded_none()
|
.rounded_none()
|
||||||
.hover(|style| {
|
.hover(|style| {
|
||||||
if is_active || is_marked {
|
if is_active {
|
||||||
style
|
style
|
||||||
} else {
|
} else {
|
||||||
let hover_color = cx.theme().colors().ghost_element_hover;
|
let hover_color = cx.theme().colors().ghost_element_hover;
|
||||||
style.bg(hover_color).border_color(hover_color)
|
style.bg(hover_color).border_color(hover_color)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.when(is_marked, |this| {
|
.when(is_marked || is_active, |this| {
|
||||||
this.border_color(cx.theme().colors().ghost_element_selected)
|
let colors = cx.theme().colors();
|
||||||
|
this.when(is_marked, |this| this.bg(colors.ghost_element_selected))
|
||||||
|
.border_color(colors.ghost_element_selected)
|
||||||
})
|
})
|
||||||
.when(
|
.when(
|
||||||
is_active && self.focus_handle.contains_focused(cx),
|
is_active && self.focus_handle.contains_focused(cx),
|
||||||
|
Loading…
Reference in New Issue
Block a user