Skip to content

Commit

Permalink
Merge pull request #33 from igorkulman/fix/screen-scaling
Browse files Browse the repository at this point in the history
Generating wallapper according to scaling factor.
  • Loading branch information
igorkulman committed Jan 12, 2021
2 parents 9fb26e2 + 03d8843 commit 1afd96c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import Cocoa

extension NSScreen {
var size: CGSize {
return frame.size
return CGSize(width: frame.size.width * backingScaleFactor, height: frame.size.height * backingScaleFactor)
}

var menuBarHeight: CGFloat {
return size.height - visibleFrame.height - visibleFrame.origin.y
return (frame.size.height - visibleFrame.height - visibleFrame.origin.y) * backingScaleFactor
}
}

0 comments on commit 1afd96c

Please sign in to comment.