From edbc26aa4a50c4e68f3994dce004901e7a562b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Fri, 4 Dec 2020 23:38:17 +0100 Subject: [PATCH] macOS: always use scale=1.0 with WindowScalePolicy::SystemScaleFactor --- README.md | 2 +- src/macos/window.rs | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 925e85e..96a9024 100644 --- a/README.md +++ b/README.md @@ -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: | | diff --git a/src/macos/window.rs b/src/macos/window.rs index 80b511d..689a8c6 100644 --- a/src/macos/window.rs +++ b/src/macos/window.rs @@ -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 { - // TODO: find system scaling - None -}