From 51877c4bca22eccc22e51de0ec638b5607853190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Albeza?= Date: Wed, 1 Jul 2026 10:43:59 +0200 Subject: [PATCH] :bug: Fix text editor cursor being too thin on dpr > 1 (#10501) --- render-wasm/src/render/text_editor.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/render-wasm/src/render/text_editor.rs b/render-wasm/src/render/text_editor.rs index 8c990942ec..361b6db165 100644 --- a/render-wasm/src/render/text_editor.rs +++ b/render-wasm/src/render/text_editor.rs @@ -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(), );