Skip to content

Commit

Permalink
🐛 Approximate fix for wrong menu bar height on non primary displays
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkulman committed May 31, 2021
1 parent 7696576 commit 96a9a66
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ extension NSScreen {
}

var menuBarHeight: CGFloat {
return (frame.size.height - visibleFrame.height - visibleFrame.origin.y) * backingScaleFactor
let computedHeight = (frame.size.height - visibleFrame.height - visibleFrame.origin.y) * backingScaleFactor
guard computedHeight > 0 else {
Log.debug("Menu bar height computation is still not good, using approximation")
return 25 * backingScaleFactor
}

return computedHeight
}
}

0 comments on commit 96a9a66

Please sign in to comment.