mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-20 03:18:06 +08:00
Round document alignment in viewport to avoid AA induced by a shift after zooming in and panning (#921)
This commit is contained in:
committed by
Keavon Chambers
parent
0c9f457866
commit
002b0fc1dd
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user