Merge branch 'main' into unborked-git-zed2-diagnostics-view
This commit is contained in:
commit
3655a96e54
128 changed files with 16288 additions and 2752 deletions
|
@ -14,8 +14,8 @@ use editor::{
|
|||
use futures::future::try_join_all;
|
||||
use gpui::{
|
||||
actions, div, AnyElement, AnyView, AppContext, Component, Context, Div, EventEmitter,
|
||||
FocusEvent, FocusHandle, Focusable, FocusableComponent, InteractiveComponent, Model,
|
||||
ParentComponent, Render, SharedString, Styled, Subscription, Task, View, ViewContext,
|
||||
FocusEvent, FocusHandle, Focusable, FocusableComponent, InteractiveComponent, ManagedView,
|
||||
Model, ParentComponent, Render, SharedString, Styled, Subscription, Task, View, ViewContext,
|
||||
VisualContext, WeakView,
|
||||
};
|
||||
use language::{
|
||||
|
@ -641,11 +641,13 @@ impl ProjectDiagnosticsEditor {
|
|||
}
|
||||
}
|
||||
|
||||
impl Item for ProjectDiagnosticsEditor {
|
||||
fn focus_handle(&self) -> FocusHandle {
|
||||
impl ManagedView for ProjectDiagnosticsEditor {
|
||||
fn focus_handle(&self, _: &AppContext) -> FocusHandle {
|
||||
self.focus_handle.clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl Item for ProjectDiagnosticsEditor {
|
||||
fn deactivated(&mut self, cx: &mut ViewContext<Self>) {
|
||||
self.editor.update(cx, |editor, cx| editor.deactivated(cx));
|
||||
}
|
||||
|
@ -1583,7 +1585,7 @@ mod tests {
|
|||
cx.update(|cx| {
|
||||
let settings = SettingsStore::test(cx);
|
||||
cx.set_global(settings);
|
||||
theme::init(cx);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
language::init(cx);
|
||||
client::init_settings(cx);
|
||||
workspace::init_settings(cx);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::{ProjectDiagnosticsEditor, ToggleWarnings};
|
||||
use gpui::{
|
||||
div, Action, CursorStyle, Div, Entity, EventEmitter, MouseButton, ParentComponent, Render,
|
||||
View, ViewContext, WeakView,
|
||||
View, ViewContext, VisualContext, WeakView,
|
||||
};
|
||||
use ui::{Icon, IconButton, StyledExt};
|
||||
use ui::{Icon, IconButton, Label, StyledExt, Tooltip};
|
||||
use workspace::{item::ItemHandle, ToolbarItemEvent, ToolbarItemLocation, ToolbarItemView};
|
||||
|
||||
pub struct ToolbarControls {
|
||||
|
@ -29,7 +29,7 @@ impl Render for ToolbarControls {
|
|||
|
||||
div().child(
|
||||
IconButton::new("toggle-warnings", Icon::ExclamationTriangle)
|
||||
.tooltip(tooltip)
|
||||
.tooltip(move |_, cx| Tooltip::text(tooltip, cx))
|
||||
.on_click(|this: &mut Self, cx| {
|
||||
if let Some(editor) = this.editor.as_ref().and_then(|editor| editor.upgrade()) {
|
||||
editor.update(cx, |editor, cx| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue