macos: only round the opposing corner

Also, removing the padding from the window edge.
This commit is contained in:
Jon Parise
2024-11-15 11:16:25 -05:00
parent 07bff5f06d
commit 69f396c252

View File

@ -172,7 +172,7 @@ extension Ghostty {
// If we have a URL from hovering a link, we show that.
if let url = surfaceView.hoverUrl {
let padding: CGFloat = 3
let padding: CGFloat = 5
ZStack {
HStack {
Spacer()
@ -182,7 +182,7 @@ extension Ghostty {
Text(verbatim: url)
.padding(.init(top: padding, leading: padding, bottom: padding, trailing: padding))
.background(
RoundedRectangle(cornerRadius: 3)
UnevenRoundedRectangle(cornerRadii: .init(topLeading: 9))
.fill(.background)
)
.lineLimit(1)
@ -190,7 +190,6 @@ extension Ghostty {
.opacity(isHoveringURLLeft ? 1 : 0)
}
}
.padding([.trailing, .bottom], padding)
HStack {
VStack(alignment: .leading) {
@ -199,7 +198,7 @@ extension Ghostty {
Text(verbatim: url)
.padding(.init(top: padding, leading: padding, bottom: padding, trailing: padding))
.background(
RoundedRectangle(cornerRadius: 3)
UnevenRoundedRectangle(cornerRadii: .init(topTrailing: 9))
.fill(.background)
)
.lineLimit(1)
@ -211,7 +210,6 @@ extension Ghostty {
}
Spacer()
}
.padding([.leading, .bottom], padding)
}
}