1
0
Fork 0

Merge pull request #66 from greatest-ape/macos-dpi

macOS: always use scale=1.0 with WindowScalePolicy::SystemScaleFactor
This commit is contained in:
william light 2020-12-04 23:43:52 +01:00 committed by GitHub
commit a13b3af3d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 10 deletions

View file

@ -15,7 +15,7 @@ Below is a proposed list of milestones (roughly in-order) and their status. Subj
| Spawns a window, no parent | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Cross-platform API for window spawning | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Window uses an OpenGL surface | :heavy_check_mark: | | :heavy_check_mark: |
| Can find DPI scale factor | | | :heavy_check_mark: |
| Can find DPI scale factor | | :heavy_check_mark: | :heavy_check_mark: |
| Basic event handling (mouse, keyboard) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Parent window support | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Send messages | | :heavy_check_mark: | |

View file

@ -128,9 +128,7 @@ impl Window {
let scaling = match options.scale {
WindowScalePolicy::ScaleFactor(scale) => scale,
WindowScalePolicy::SystemScaleFactor => {
get_scaling().unwrap_or(1.0)
},
WindowScalePolicy::SystemScaleFactor => 1.0,
};
let window_info = WindowInfo::from_logical_size(
@ -293,9 +291,3 @@ unsafe impl HasRawWindowHandle for Window {
})
}
}
fn get_scaling() -> Option<f64> {
// TODO: find system scaling
None
}