Only invalidate parent view on click/hover if we read that state when rendering
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
934474f87e
commit
bc03592912
19 changed files with 124 additions and 55 deletions
|
@ -101,7 +101,7 @@ impl PickerDelegate for ContactFinder {
|
|||
fn render_match(
|
||||
&self,
|
||||
ix: usize,
|
||||
mouse_state: MouseState,
|
||||
mouse_state: &mut MouseState,
|
||||
selected: bool,
|
||||
cx: &gpui::AppContext,
|
||||
) -> ElementBox {
|
||||
|
|
|
@ -653,7 +653,11 @@ impl ContactList {
|
|||
.constrained()
|
||||
.with_height(theme.row_height)
|
||||
.contained()
|
||||
.with_style(*theme.contact_row.style_for(Default::default(), is_selected))
|
||||
.with_style(
|
||||
*theme
|
||||
.contact_row
|
||||
.style_for(&mut Default::default(), is_selected),
|
||||
)
|
||||
.boxed()
|
||||
}
|
||||
|
||||
|
@ -768,7 +772,9 @@ impl ContactList {
|
|||
) -> ElementBox {
|
||||
enum Header {}
|
||||
|
||||
let header_style = theme.header_row.style_for(Default::default(), is_selected);
|
||||
let header_style = theme
|
||||
.header_row
|
||||
.style_for(&mut Default::default(), is_selected);
|
||||
let text = match section {
|
||||
Section::ActiveCall => "Collaborators",
|
||||
Section::Requests => "Contact Requests",
|
||||
|
@ -890,7 +896,11 @@ impl ContactList {
|
|||
.constrained()
|
||||
.with_height(theme.row_height)
|
||||
.contained()
|
||||
.with_style(*theme.contact_row.style_for(Default::default(), is_selected))
|
||||
.with_style(
|
||||
*theme
|
||||
.contact_row
|
||||
.style_for(&mut Default::default(), is_selected),
|
||||
)
|
||||
.boxed()
|
||||
})
|
||||
.on_click(MouseButton::Left, move |_, cx| {
|
||||
|
@ -1014,7 +1024,11 @@ impl ContactList {
|
|||
row.constrained()
|
||||
.with_height(theme.row_height)
|
||||
.contained()
|
||||
.with_style(*theme.contact_row.style_for(Default::default(), is_selected))
|
||||
.with_style(
|
||||
*theme
|
||||
.contact_row
|
||||
.style_for(&mut Default::default(), is_selected),
|
||||
)
|
||||
.boxed()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue