mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-21 17:21:52 +00:00
fix: macos incorrect quick terminal position
This commit is contained in:
@@ -89,13 +89,13 @@ enum QuickTerminalPosition : String {
|
|||||||
return .init(x: screen.frame.minX, y: -window.frame.height)
|
return .init(x: screen.frame.minX, y: -window.frame.height)
|
||||||
|
|
||||||
case .left:
|
case .left:
|
||||||
return .init(x: -window.frame.width, y: 0)
|
return .init(x: screen.frame.minX-window.frame.width, y: 0)
|
||||||
|
|
||||||
case .right:
|
case .right:
|
||||||
return .init(x: screen.frame.maxX, y: 0)
|
return .init(x: screen.frame.maxX, y: 0)
|
||||||
|
|
||||||
case .center:
|
case .center:
|
||||||
return .init(x: (screen.visibleFrame.maxX - window.frame.width) / 2, y: screen.visibleFrame.maxY - window.frame.width)
|
return .init(x: screen.visibleFrame.origin.x + (screen.visibleFrame.width - window.frame.width) / 2, y: screen.visibleFrame.height - window.frame.width)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ enum QuickTerminalPosition : String {
|
|||||||
return .init(x: screen.visibleFrame.maxX - window.frame.width, y: window.frame.origin.y)
|
return .init(x: screen.visibleFrame.maxX - window.frame.width, y: window.frame.origin.y)
|
||||||
|
|
||||||
case .center:
|
case .center:
|
||||||
return .init(x: (screen.visibleFrame.maxX - window.frame.width) / 2, y: (screen.visibleFrame.maxY - window.frame.height) / 2)
|
return .init(x: screen.visibleFrame.origin.x + (screen.visibleFrame.width - window.frame.width) / 2, y: screen.visibleFrame.origin.y + (screen.visibleFrame.height - window.frame.height) / 2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user