Use correct font family and line_height in git blame sidebar (#9935)
This fixes the git blame sidebar looking wrong if the buffer font size is higher than the UI font size (which is what was previously used). It fixes this:  To now look like this:  Release Notes: - N/A
This commit is contained in:
parent
50fc54c321
commit
98adc7b108
1 changed files with 5 additions and 0 deletions
|
@ -1111,6 +1111,7 @@ impl EditorElement {
|
||||||
let start_x = em_width * 1;
|
let start_x = em_width * 1;
|
||||||
|
|
||||||
let mut last_used_color: Option<(PlayerColor, Oid)> = None;
|
let mut last_used_color: Option<(PlayerColor, Oid)> = None;
|
||||||
|
let text_style = &self.style.text;
|
||||||
|
|
||||||
let shaped_lines = blamed_rows
|
let shaped_lines = blamed_rows
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
@ -1121,6 +1122,7 @@ impl EditorElement {
|
||||||
ix,
|
ix,
|
||||||
&blame,
|
&blame,
|
||||||
blame_entry,
|
blame_entry,
|
||||||
|
text_style,
|
||||||
&mut last_used_color,
|
&mut last_used_color,
|
||||||
self.editor.clone(),
|
self.editor.clone(),
|
||||||
cx,
|
cx,
|
||||||
|
@ -2868,6 +2870,7 @@ fn render_blame_entry(
|
||||||
ix: usize,
|
ix: usize,
|
||||||
blame: &gpui::Model<GitBlame>,
|
blame: &gpui::Model<GitBlame>,
|
||||||
blame_entry: BlameEntry,
|
blame_entry: BlameEntry,
|
||||||
|
text_style: &TextStyle,
|
||||||
last_used_color: &mut Option<(PlayerColor, Oid)>,
|
last_used_color: &mut Option<(PlayerColor, Oid)>,
|
||||||
editor: View<Editor>,
|
editor: View<Editor>,
|
||||||
cx: &mut ElementContext<'_>,
|
cx: &mut ElementContext<'_>,
|
||||||
|
@ -2911,6 +2914,8 @@ fn render_blame_entry(
|
||||||
let commit_message = blame.read(cx).message_for_entry(&blame_entry);
|
let commit_message = blame.read(cx).message_for_entry(&blame_entry);
|
||||||
|
|
||||||
h_flex()
|
h_flex()
|
||||||
|
.font(text_style.font().family)
|
||||||
|
.line_height(text_style.line_height)
|
||||||
.id(("blame", ix))
|
.id(("blame", ix))
|
||||||
.children([
|
.children([
|
||||||
div()
|
div()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue