Tweak diagnostic header styling

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld
2022-01-25 15:33:49 -08:00
co-authored by Nathan Sobo
parent e04e929010
commit cefb63936d
6 changed files with 10 additions and 6 deletions
@@ -72,6 +72,7 @@ pub struct BlockContext<'a> {
pub gutter_width: f32,
pub gutter_padding: f32,
pub em_width: f32,
pub line_height: f32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
@@ -951,6 +952,7 @@ mod tests {
anchor_x: 0.,
gutter_padding: 0.,
gutter_width: 0.,
line_height: 0.,
em_width: 0.,
})
.name()
+1
View File
@@ -617,6 +617,7 @@ impl EditorElement {
cx,
anchor_x,
gutter_padding,
line_height,
gutter_width,
em_width,
});
+2
View File
@@ -334,6 +334,8 @@ impl View for DiagnosticMessage {
diagnostic.message.lines().next().unwrap().to_string(),
theme.diagnostic_message.clone(),
)
.contained()
.with_margin_left(theme.item_spacing)
.boxed()
} else {
Empty::new().boxed()