Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Tweak warning diagnostic toggle (#18637)
Danilo Leala5f50e5c1e7f
diff --git a/crates/diagnostics/src/toolbar_controls.rs b/crates/diagnostics/src/toolbar_controls.rsindex b546db50a06..0d300081426 100644--- a/crates/diagnostics/src/toolbar_controls.rs+++ b/crates/diagnostics/src/toolbar_controls.rs@@ -1,7 +1,7 @@use crate::ProjectDiagnosticsEditor;use gpui::{EventEmitter, ParentElement, Render, View, ViewContext, WeakView};use ui::prelude::*;-use ui::{IconButton, IconName, Tooltip};+use ui::{IconButton, IconButtonShape, IconName, Tooltip};use workspace::{item::ItemHandle, ToolbarItemEvent, ToolbarItemLocation, ToolbarItemView};pub struct ToolbarControls {@@ -33,11 +33,19 @@ impl Render for ToolbarControls {"Include Warnings"};+ let warning_color = if include_warnings {+ Color::Warning+ } else {+ Color::Muted+ };+h_flex()+ .gap_1().when(has_stale_excerpts, |div| {div.child(IconButton::new("update-excerpts", IconName::Update).icon_color(Color::Info)+ .shape(IconButtonShape::Square).disabled(is_updating).tooltip(move |cx| Tooltip::text("Update excerpts", cx)).on_click(cx.listener(|this, _, cx| {@@ -51,6 +59,8 @@ impl Render for ToolbarControls {}).child(IconButton::new("toggle-warnings", IconName::Warning)+ .icon_color(warning_color)+ .shape(IconButtonShape::Square).tooltip(move |cx| Tooltip::text(tooltip, cx)).on_click(cx.listener(|this, _, cx| {if let Some(editor) = this.editor() {