From 69f396c252f1dc1734da0a9c580ea5b76b6698eb Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Fri, 15 Nov 2024 11:16:25 -0500 Subject: [PATCH] macos: only round the opposing corner Also, removing the padding from the window edge. --- macos/Sources/Ghostty/SurfaceView.swift | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/macos/Sources/Ghostty/SurfaceView.swift b/macos/Sources/Ghostty/SurfaceView.swift index 55733cb1d..5d9ff501d 100644 --- a/macos/Sources/Ghostty/SurfaceView.swift +++ b/macos/Sources/Ghostty/SurfaceView.swift @@ -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) } }