From 36354cc5e446e230ae12ec421c09b394d4209e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=81=92?= Date: Mon, 19 Aug 2024 16:37:40 +0800 Subject: [PATCH] Set cursor width to an integer to prevent width fluctuation on low PPI devices. (#169) Before https://github.com/user-attachments/assets/38ceac8e-c98d-43c7-844b-0a2fb7d416a5 After https://github.com/user-attachments/assets/e3f9c70e-773e-4606-ad6a-021b0e7fd7c9 --- crates/ui/src/input/input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui/src/input/input.rs b/crates/ui/src/input/input.rs index ca1e955a..9b4cec5c 100644 --- a/crates/ui/src/input/input.rs +++ b/crates/ui/src/input/input.rs @@ -931,7 +931,7 @@ impl Element for TextElement { Some(fill( Bounds::new( point(bounds.left() + cursor_pos, bounds.top() + inset), - size(px(1.5), bounds.bottom() - bounds.top() - inset * 2), + size(px(2.), bounds.bottom() - bounds.top() - inset * 2), ), crate::blue_500(), )),