Add red background to blocks that need styling

Antonio Scandurra created

Change summary

crates/editor2/src/editor.rs  |  2 ++
crates/editor2/src/element.rs | 10 ++++++++--
2 files changed, 10 insertions(+), 2 deletions(-)

Detailed changes

crates/editor2/src/editor.rs 🔗

@@ -9974,6 +9974,8 @@ pub fn diagnostic_block_renderer(diagnostic: Diagnostic, is_valid: bool) -> Rend
         let message = message.clone();
         v_stack()
             .id(cx.block_id)
+            .size_full()
+            .bg(gpui::red())
             .children(highlighted_lines.iter().map(|(line, highlights)| {
                 div()
                     .child(HighlightedLabel::new(line.clone(), highlights.clone()))

crates/editor2/src/element.rs 🔗

@@ -21,7 +21,7 @@ use gpui::{
     point, px, relative, size, transparent_black, Action, AnyElement, AvailableSpace, BorrowWindow,
     Bounds, Component, ContentMask, Corners, DispatchPhase, Edges, Element, ElementId,
     ElementInputHandler, Entity, Hsla, Line, MouseButton, MouseDownEvent, MouseMoveEvent,
-    MouseUpEvent, ParentElement, Pixels, ScrollWheelEvent, Size, Style, TextRun, TextStyle,
+    MouseUpEvent, ParentElement, Pixels, ScrollWheelEvent, Size, Style, Styled, TextRun, TextStyle,
     ViewContext, WindowContext,
 };
 use itertools::Itertools;
@@ -2057,12 +2057,18 @@ impl EditorElement {
                         }
 
                         h_stack()
+                            .size_full()
+                            .bg(gpui::red())
                             .child(filename.unwrap_or_else(|| "untitled".to_string()))
                             .children(parent_path)
                             .children(jump_icon) // .p_x(gutter_padding)
                     } else {
                         let text_style = style.text.clone();
-                        h_stack().child("⋯").children(jump_icon) // .p_x(gutter_padding)
+                        h_stack()
+                            .size_full()
+                            .bg(gpui::red())
+                            .child("⋯")
+                            .children(jump_icon) // .p_x(gutter_padding)
                     };
                     element.render()
                 }