From 77bf93c32f281b0b760413320e33ffd7883a065d Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 10 Mar 2024 12:41:53 +0100 Subject: Use integer coordinates for input caret This should stop the caret from changing thickness in screens with an integral scale factor. --- widget/src/text_input.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'widget/src/text_input.rs') diff --git a/widget/src/text_input.rs b/widget/src/text_input.rs index 449524fc..9ed8480a 100644 --- a/widget/src/text_input.rs +++ b/widget/src/text_input.rs @@ -390,7 +390,8 @@ where Some(( renderer::Quad { bounds: Rectangle { - x: text_bounds.x + text_value_width, + x: (text_bounds.x + text_value_width) + .floor(), y: text_bounds.y, width: 1.0, height: text_bounds.height, -- cgit