fix(macos): Fix scaling on mac-os

On MacOS points and pixels are the same.
macos-click-through
Serg Tereshchenko 3 years ago
parent cacde9ec9d
commit 42ff24518b

@ -326,6 +326,10 @@ fn points_to_pixels(value: f32) -> f32 {
// from points to pixels, so this is standard constant values.
let pixels_per_inch = 96.0;
let points_per_inch = 72.0;
// On macos points == pixels
#[cfg(target_os = "macos")]
let points_per_inch = 96.0;
let pixels_per_point = pixels_per_inch / points_per_inch;
value * pixels_per_point

Loading…
Cancel
Save