winit
winit copied to clipboard
Reduce duplication in `dpi` module
Grabbed from https://github.com/rust-windowing/winit/pull/1374. The motivation in here was to add a Delta
variant of these (as part of a replacement of MouseScrollDelta
).
The only API changes in this PR is the PartialOrd
/Ord
impls, as noted in the changelog, the rest is merely a code-reduction that I believe is valuable (makes it much easier to see what's different between Size
and Position
).
Tagging original author @Osspial.
- [x] Tested on all platforms changed
- [x] Added an entry to
CHANGELOG.md
if knowledge of this change could be valuable to users - [x] Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
- [x] Created or updated an example program if it would help users understand this functionality
- [x] Updated feature matrix, if new features were added or implemented