Merge pull request #828 from Kethku/fix-macos-scaling

fix(macos): Fix scaling on mac-os
macos-click-through
partizan 3 years ago committed by GitHub
commit f58b9470a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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