From 9969caf5138e9616a0afa4a6877158af3af16b27 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Fri, 17 Nov 2023 23:39:40 -0500 Subject: [PATCH] Style empty diagnostics as an editor --- crates/diagnostics2/src/diagnostics.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/diagnostics2/src/diagnostics.rs b/crates/diagnostics2/src/diagnostics.rs index 672350ad9e..623b636319 100644 --- a/crates/diagnostics2/src/diagnostics.rs +++ b/crates/diagnostics2/src/diagnostics.rs @@ -34,6 +34,7 @@ use std::{ path::PathBuf, sync::Arc, }; +use theme::ActiveTheme; pub use toolbar_controls::ToolbarControls; use ui::{h_stack, HighlightedLabel, Icon, IconElement, Label, TextColor}; use util::TryFutureExt; @@ -92,9 +93,10 @@ impl EventEmitter for ProjectDiagnosticsEditor {} impl Render for ProjectDiagnosticsEditor { type Element = Focusable>; - fn render(&mut self, _: &mut ViewContext) -> Self::Element { + fn render(&mut self, cx: &mut ViewContext) -> Self::Element { let child = if self.path_states.is_empty() { div() + .bg(cx.theme().colors().editor_background) .flex() .items_center() .justify_center()