Merge pull request #2320 from iced-rs/fix/input-cursor-alignment

Use integer coordinates for input caret
This commit is contained in:
Héctor Ramón 2024-03-10 12:57:20 +01:00 committed by GitHub
commit f00e7c4dc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -538,7 +538,7 @@ where
renderer.fill_quad(
renderer::Quad {
bounds: Rectangle {
x: position.x,
x: position.x.floor(),
y: position.y,
width: 1.0,
height: self

View file

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