mirror of
https://github.com/penpot/penpot.git
synced 2026-07-03 21:05:25 +00:00
🐛 Fix text editor cursor being too thin on dpr > 1 (#10501)
This commit is contained in:
parent
782adffec8
commit
51877c4bca
@ -30,7 +30,7 @@ pub fn render_overlay(
|
||||
}
|
||||
|
||||
if editor_state.cursor_visible {
|
||||
render_cursor(canvas, zoom, editor_state, text_content, shape);
|
||||
render_cursor(canvas, zoom, options.dpr, editor_state, text_content, shape);
|
||||
}
|
||||
|
||||
canvas.restore();
|
||||
@ -39,6 +39,7 @@ pub fn render_overlay(
|
||||
fn render_cursor(
|
||||
canvas: &Canvas,
|
||||
zoom: f32,
|
||||
dpr: f32,
|
||||
editor_state: &TextEditorState,
|
||||
text_content: &TextContent,
|
||||
shape: &Shape,
|
||||
@ -54,7 +55,7 @@ fn render_cursor(
|
||||
if editor_state.is_overtype_mode {
|
||||
rect.width()
|
||||
} else {
|
||||
editor_state.theme.cursor_width / zoom
|
||||
editor_state.theme.cursor_width / zoom * dpr
|
||||
},
|
||||
rect.height(),
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user