Round document alignment in viewport to avoid AA induced by a shift after zooming in and panning (#921)

This commit is contained in:
0HyperCube
2022-12-28 12:06:06 +00:00
committed by Keavon Chambers
parent 0c9f457866
commit 002b0fc1dd
3 changed files with 9 additions and 5 deletions

View File

@@ -29,7 +29,7 @@ impl MessageHandler<InputPreprocessorMessage, KeyboardPlatformLayout> for InputP
let new_size = bounds.size();
let existing_size = self.viewport_bounds.size();
let translation = (new_size - existing_size) / 2.;
let translation = ((new_size - existing_size) / 2.).round();
// TODO: Extend this to multiple viewports instead of setting it to the value of this last loop iteration
self.viewport_bounds = bounds;