Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix overlapping block headers when using custom line height

Thorsten Ball1cbdf2ba22b0
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index 895df153406..b82bd55bcf5 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -2288,17 +2288,18 @@ impl EditorElement {
.map(|p| SharedString::from(p.to_string_lossy().to_string() + "/"));
}
- div()
+ v_flex()
.id(("path header container", block_id))
.size_full()
- .p_1p5()
+ .justify_center()
+ .p(gpui::px(6.))
.child(
h_flex()
.id("path header block")
- .py_1p5()
- .pl_3()
- .pr_2()
- .rounded_lg()
+ .size_full()
+ .pl(gpui::px(12.))
+ .pr(gpui::px(8.))
+ .rounded_md()
.shadow_md()
.border()
.border_color(cx.theme().colors().border)
@@ -2861,6 +2862,7 @@ impl Element for EditorElement {
cx.with_text_style(
Some(gpui::TextStyleRefinement {
font_size: Some(self.style.text.font_size),
+ line_height: Some(self.style.text.line_height),
..Default::default()
}),
|cx| {