From 1ede003de20822d7a1419e125db8e7bc974e8621 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 8 Jan 2024 11:55:51 -0500 Subject: [PATCH] Always show checking with icon if checks are still running --- assets/icons/arrow_circle.svg | 7 ++++++- crates/diagnostics/src/items.rs | 24 +++++++++++++----------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/assets/icons/arrow_circle.svg b/assets/icons/arrow_circle.svg index 750e349e2b..90e352bdea 100644 --- a/assets/icons/arrow_circle.svg +++ b/assets/icons/arrow_circle.svg @@ -1 +1,6 @@ - + + + + + + diff --git a/crates/diagnostics/src/items.rs b/crates/diagnostics/src/items.rs index a250713e65..0c2d673d8e 100644 --- a/crates/diagnostics/src/items.rs +++ b/crates/diagnostics/src/items.rs @@ -24,15 +24,11 @@ impl Render for DiagnosticIndicator { fn render(&mut self, cx: &mut ViewContext) -> impl IntoElement { let diagnostic_indicator = match (self.summary.error_count, self.summary.warning_count) { (0, 0) => h_stack().map(|this| { - if !self.in_progress_checks.is_empty() { - this.child(IconElement::new(Icon::ArrowCircle).size(IconSize::Small)) - } else { - this.child( - IconElement::new(Icon::Check) - .size(IconSize::Small) - .color(Color::Default), - ) - } + this.child( + IconElement::new(Icon::Check) + .size(IconSize::Small) + .color(Color::Default), + ) }), (0, warning_count) => h_stack() .gap_1() @@ -68,8 +64,14 @@ impl Render for DiagnosticIndicator { let status = if !self.in_progress_checks.is_empty() { Some( - Label::new("Checking…") - .size(LabelSize::Small) + h_stack() + .gap_2() + .child(IconElement::new(Icon::ArrowCircle).size(IconSize::Small)) + .child( + Label::new("Checking…") + .size(LabelSize::Small) + .into_any_element(), + ) .into_any_element(), ) } else if let Some(diagnostic) = &self.current_diagnostic {