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 04:06:06 -08:00
committed by Keavon Chambers
parent d66f09da08
commit 22866acefb
3 changed files with 9 additions and 5 deletions
@@ -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;