Use integer coordinates for input caret
This should stop the caret from changing thickness in screens with an integral scale factor.
This commit is contained in:
parent
4b33a450e0
commit
77bf93c32f
2 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue