mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 15:44:20 +03:00
Fix overlapping block headers when using custom line height
This fixes block headers overlapping over text in the buffer when using a custom line height of 1.25. It fixes the issue by making the parent container a v-flex, vertically-justifying the content and moving from relative padding to absolute padding for the header itself. Co-authored-by: antonio <antonio@zed.dev> Co-authored-by: julia <julia@zed.dev> Co-authored-by: marshall <marshall@zed.dev>
This commit is contained in:
parent
0bf66e486a
commit
1cbdf2ba22
@ -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| {
|
||||
|
Loading…
Reference in New Issue
Block a user