mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-26 01:22:53 +01:00
Adjust for < 0 x origin.
This commit is contained in:
parent
ca5703e14f
commit
c692d357d2
@ -75,11 +75,14 @@ public extension NSWindow {
|
||||
return
|
||||
}
|
||||
|
||||
let paddingFromBottomEdge: CGFloat = 8.0
|
||||
let paddingFromEdge: CGFloat = 8.0
|
||||
var unflippedPoint = point
|
||||
unflippedPoint.y = (screenFrame.maxY - point.y) - frame.height
|
||||
if unflippedPoint.y < 0 {
|
||||
unflippedPoint.y = paddingFromBottomEdge
|
||||
unflippedPoint.y = paddingFromEdge
|
||||
}
|
||||
if unflippedPoint.x < 0 {
|
||||
unflippedPoint.x = paddingFromEdge
|
||||
}
|
||||
setFrameOrigin(unflippedPoint)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user