From f7f5a255845b45ac33ab88bfdc023894034168b7 Mon Sep 17 00:00:00 2001 From: Kyle Kelley Date: Fri, 16 Aug 2024 00:31:46 -0500 Subject: [PATCH] repl: Apply border for error output on left (#16334) --- crates/repl/src/outputs.rs | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/crates/repl/src/outputs.rs b/crates/repl/src/outputs.rs index c3e54385ace198e1927178204f15aba01cdde924..03920260676054e7bd7a7962d3378d8d615c7bf6 100644 --- a/crates/repl/src/outputs.rs +++ b/crates/repl/src/outputs.rs @@ -257,17 +257,31 @@ impl ErrorView { Some( v_flex() - .w_full() - .px(padding) - .py(padding) - .border_1() - .border_color(theme.status().error_border) + .gap_3() .child( h_flex() - .font_weight(FontWeight::BOLD) - .child(format!("{}: {}", self.ename, self.evalue)), + .font_buffer(cx) + .child( + Label::new(format!("{}: ", self.ename.clone())) + // .size(LabelSize::Large) + .color(Color::Error) + .weight(FontWeight::BOLD), + ) + .child( + Label::new(self.evalue.clone()) + // .size(LabelSize::Large) + .weight(FontWeight::BOLD), + ), + ) + .child( + div() + .w_full() + .px(padding) + .py(padding) + .border_l_1() + .border_color(theme.status().error_border) + .child(self.traceback.render(cx)), ) - .child(self.traceback.render(cx)) .into_any_element(), ) }