Fix mouse clicks on remote-open-folder UI (#19851)

Also change Zed's standard style to use
`.track_focus(&self.focus_handle(cx))`, instead of
`.track_focus(&self.focus_handle)`, to catch these kinds of errors more
easily in the future.

Release Notes:

- N/A

---------

Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
Mikayla Maki 2024-10-28 12:55:55 -07:00 committed by GitHub
parent 826d83edfe
commit 80f89059aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 28 additions and 28 deletions

View file

@ -658,7 +658,7 @@ impl Render for Dock {
div()
.key_context(dispatch_context)
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.flex()
.bg(cx.theme().colors().panel_background)
.border_color(cx.theme().colors().border)
@ -689,7 +689,7 @@ impl Render for Dock {
} else {
div()
.key_context(dispatch_context)
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
}
}
}
@ -826,8 +826,8 @@ pub mod test {
}
impl Render for TestPanel {
fn render(&mut self, _cx: &mut ViewContext<Self>) -> impl IntoElement {
div().id("test").track_focus(&self.focus_handle)
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
div().id("test").track_focus(&self.focus_handle(cx))
}
}

View file

@ -1173,8 +1173,8 @@ pub mod test {
}
impl Render for TestItem {
fn render(&mut self, _: &mut ViewContext<Self>) -> impl IntoElement {
gpui::div().track_focus(&self.focus_handle)
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
gpui::div().track_focus(&self.focus_handle(cx))
}
}

View file

@ -2574,7 +2574,7 @@ impl Render for Pane {
v_flex()
.key_context(key_context)
.track_focus(&self.focus_handle)
.track_focus(&self.focus_handle(cx))
.size_full()
.flex_none()
.overflow_hidden()