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
This commit is contained in:
王恒 2024-08-19 16:37:40 +08:00 committed by GitHub
parent 7a00e8a68e
commit 36354cc5e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(),
)),