[window] round position to nearest physical pixel, not nearest point
This commit is contained in:
parent
373b1c2911
commit
056c0ad794
1 changed files with 2 additions and 3 deletions
|
@ -131,7 +131,7 @@ impl Area {
|
|||
vel: Vec2::zero(),
|
||||
});
|
||||
state.pos = fixed_pos.unwrap_or(state.pos);
|
||||
state.pos = state.pos.round();
|
||||
state.pos = ctx.round_pos_to_pixels(state.pos);
|
||||
|
||||
Prepared {
|
||||
layer,
|
||||
|
@ -213,8 +213,7 @@ impl Prepared {
|
|||
ctx.input().screen_size.x - margin,
|
||||
ctx.input().screen_size.y - margin,
|
||||
));
|
||||
|
||||
state.pos = state.pos.round();
|
||||
state.pos = ctx.round_pos_to_pixels(state.pos);
|
||||
|
||||
// ctx.debug_rect(
|
||||
// Rect::from_min_size(state.pos, state.size),
|
||||
|
|
Loading…
Reference in a new issue