Merge pull request #66 from greatest-ape/macos-dpi
macOS: always use scale=1.0 with WindowScalePolicy::SystemScaleFactor
This commit is contained in:
commit
a13b3af3d1
|
@ -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: | |
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue