Reorder items in the quick action bar (#34203)
Namely, putting the diagnostics items in their own little section, divider from the other "inline" and minimap/edit prediction items. I feel like this is an easier to parse organization, even though all the "inlines" made sense to be somewhat close together. Release Notes: - N/A
This commit is contained in:
parent
3169f06404
commit
51c24e2010
1 changed files with 48 additions and 46 deletions
|
@ -338,52 +338,6 @@ impl Render for QuickActionBar {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if supports_diagnostics {
|
|
||||||
menu = menu.toggleable_entry(
|
|
||||||
"Diagnostics",
|
|
||||||
diagnostics_enabled,
|
|
||||||
IconPosition::Start,
|
|
||||||
Some(ToggleDiagnostics.boxed_clone()),
|
|
||||||
{
|
|
||||||
let editor = editor.clone();
|
|
||||||
move |window, cx| {
|
|
||||||
editor
|
|
||||||
.update(cx, |editor, cx| {
|
|
||||||
editor.toggle_diagnostics(
|
|
||||||
&ToggleDiagnostics,
|
|
||||||
window,
|
|
||||||
cx,
|
|
||||||
);
|
|
||||||
})
|
|
||||||
.ok();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
if supports_inline_diagnostics {
|
|
||||||
menu = menu.toggleable_entry(
|
|
||||||
"Inline Diagnostics",
|
|
||||||
inline_diagnostics_enabled,
|
|
||||||
IconPosition::Start,
|
|
||||||
Some(ToggleInlineDiagnostics.boxed_clone()),
|
|
||||||
{
|
|
||||||
let editor = editor.clone();
|
|
||||||
move |window, cx| {
|
|
||||||
editor
|
|
||||||
.update(cx, |editor, cx| {
|
|
||||||
editor.toggle_inline_diagnostics(
|
|
||||||
&ToggleInlineDiagnostics,
|
|
||||||
window,
|
|
||||||
cx,
|
|
||||||
);
|
|
||||||
})
|
|
||||||
.ok();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if supports_minimap {
|
if supports_minimap {
|
||||||
menu = menu.toggleable_entry("Minimap", minimap_enabled, IconPosition::Start, Some(editor::actions::ToggleMinimap.boxed_clone()), {
|
menu = menu.toggleable_entry("Minimap", minimap_enabled, IconPosition::Start, Some(editor::actions::ToggleMinimap.boxed_clone()), {
|
||||||
let editor = editor.clone();
|
let editor = editor.clone();
|
||||||
|
@ -432,6 +386,54 @@ impl Render for QuickActionBar {
|
||||||
|
|
||||||
menu = menu.separator();
|
menu = menu.separator();
|
||||||
|
|
||||||
|
if supports_diagnostics {
|
||||||
|
menu = menu.toggleable_entry(
|
||||||
|
"Diagnostics",
|
||||||
|
diagnostics_enabled,
|
||||||
|
IconPosition::Start,
|
||||||
|
Some(ToggleDiagnostics.boxed_clone()),
|
||||||
|
{
|
||||||
|
let editor = editor.clone();
|
||||||
|
move |window, cx| {
|
||||||
|
editor
|
||||||
|
.update(cx, |editor, cx| {
|
||||||
|
editor.toggle_diagnostics(
|
||||||
|
&ToggleDiagnostics,
|
||||||
|
window,
|
||||||
|
cx,
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.ok();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
if supports_inline_diagnostics {
|
||||||
|
menu = menu.toggleable_entry(
|
||||||
|
"Inline Diagnostics",
|
||||||
|
inline_diagnostics_enabled,
|
||||||
|
IconPosition::Start,
|
||||||
|
Some(ToggleInlineDiagnostics.boxed_clone()),
|
||||||
|
{
|
||||||
|
let editor = editor.clone();
|
||||||
|
move |window, cx| {
|
||||||
|
editor
|
||||||
|
.update(cx, |editor, cx| {
|
||||||
|
editor.toggle_inline_diagnostics(
|
||||||
|
&ToggleInlineDiagnostics,
|
||||||
|
window,
|
||||||
|
cx,
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.ok();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
menu = menu.separator();
|
||||||
|
}
|
||||||
|
|
||||||
menu = menu.toggleable_entry(
|
menu = menu.toggleable_entry(
|
||||||
"Line Numbers",
|
"Line Numbers",
|
||||||
show_line_numbers,
|
show_line_numbers,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue