1
0
Fork 0

macOS: always use scale=1.0 with WindowScalePolicy::SystemScaleFactor

This commit is contained in:
Joakim Frostegård 2020-12-04 23:38:17 +01:00
parent 67cdd7bdfc
commit edbc26aa4a
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: | | 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: | | 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: | | 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: | | 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: | | Parent window support | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Send messages | | :heavy_check_mark: | | | Send messages | | :heavy_check_mark: | |

View file

@ -128,9 +128,7 @@ impl Window {
let scaling = match options.scale { let scaling = match options.scale {
WindowScalePolicy::ScaleFactor(scale) => scale, WindowScalePolicy::ScaleFactor(scale) => scale,
WindowScalePolicy::SystemScaleFactor => { WindowScalePolicy::SystemScaleFactor => 1.0,
get_scaling().unwrap_or(1.0)
},
}; };
let window_info = WindowInfo::from_logical_size( 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
}