Merge branch 'main' into taffy
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
commit
740b105330
41 changed files with 536 additions and 113 deletions
|
@ -303,10 +303,10 @@ impl Pane {
|
|||
let tooltip_label;
|
||||
if pane.is_zoomed() {
|
||||
icon_path = "icons/minimize_8.svg";
|
||||
tooltip_label = "Zoom In".into();
|
||||
tooltip_label = "Zoom In";
|
||||
} else {
|
||||
icon_path = "icons/maximize_8.svg";
|
||||
tooltip_label = "Zoom In".into();
|
||||
tooltip_label = "Zoom In";
|
||||
}
|
||||
|
||||
Pane::render_tab_bar_button(
|
||||
|
@ -1397,7 +1397,7 @@ impl Pane {
|
|||
bounds: square,
|
||||
background: Some(color),
|
||||
border: Default::default(),
|
||||
corner_radius: diameter / 2.,
|
||||
corner_radii: (diameter / 2.).into(),
|
||||
});
|
||||
}
|
||||
})
|
||||
|
@ -1477,7 +1477,7 @@ impl Pane {
|
|||
index: usize,
|
||||
icon: &'static str,
|
||||
is_active: bool,
|
||||
tooltip: Option<(String, Option<Box<dyn Action>>)>,
|
||||
tooltip: Option<(&'static str, Option<Box<dyn Action>>)>,
|
||||
cx: &mut ViewContext<Pane>,
|
||||
on_click: F1,
|
||||
on_down: F2,
|
||||
|
|
|
@ -61,7 +61,7 @@ where
|
|||
bounds: overlay_region,
|
||||
background: Some(overlay_color(cx)),
|
||||
border: Default::default(),
|
||||
corner_radius: 0.,
|
||||
corner_radii: Default::default(),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -220,7 +220,7 @@ fn nav_button<A: Action, F: 'static + Fn(&mut Toolbar, &mut ViewContext<Toolbar>
|
|||
spacing: f32,
|
||||
on_click: F,
|
||||
tooltip_action: A,
|
||||
action_name: &str,
|
||||
action_name: &'static str,
|
||||
cx: &mut ViewContext<Toolbar>,
|
||||
) -> AnyElement<Toolbar> {
|
||||
MouseEventHandler::<A, _>::new(0, cx, |state, _| {
|
||||
|
@ -252,7 +252,7 @@ fn nav_button<A: Action, F: 'static + Fn(&mut Toolbar, &mut ViewContext<Toolbar>
|
|||
})
|
||||
.with_tooltip::<A>(
|
||||
0,
|
||||
action_name.to_string(),
|
||||
action_name,
|
||||
Some(Box::new(tooltip_action)),
|
||||
tooltip_style,
|
||||
cx,
|
||||
|
|
|
@ -3614,7 +3614,7 @@ fn notify_of_new_dock(workspace: &WeakViewHandle<Workspace>, cx: &mut AsyncAppCo
|
|||
bounds,
|
||||
background: Some(code_span_background_color),
|
||||
border: Default::default(),
|
||||
corner_radius: 2.0,
|
||||
corner_radii: (2.0).into(),
|
||||
})
|
||||
})
|
||||
.into_any()
|
||||
|
@ -4067,10 +4067,10 @@ pub fn restart(_: &Restart, cx: &mut AppContext) {
|
|||
|
||||
// If the user cancels any save prompt, then keep the app open.
|
||||
for window in workspace_windows {
|
||||
if let Some(close) = window.update_root(&mut cx, |workspace, cx| {
|
||||
if let Some(should_close) = window.update_root(&mut cx, |workspace, cx| {
|
||||
workspace.prepare_to_close(true, cx)
|
||||
}) {
|
||||
if !close.await? {
|
||||
if !should_close.await? {
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue