mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 01:06:08 +03:00
macos: add rounded corners to the URL hover view
Also pad the view's position from the corners of the surface.
This commit is contained in:
@ -181,12 +181,16 @@ extension Ghostty {
|
||||
|
||||
Text(verbatim: url)
|
||||
.padding(.init(top: padding, leading: padding, bottom: padding, trailing: padding))
|
||||
.background(.background)
|
||||
.background(
|
||||
RoundedRectangle(cornerRadius: 5)
|
||||
.fill(.background)
|
||||
)
|
||||
.lineLimit(1)
|
||||
.truncationMode(.middle)
|
||||
.opacity(isHoveringURLLeft ? 1 : 0)
|
||||
}
|
||||
}
|
||||
.padding([.trailing, .bottom], padding)
|
||||
|
||||
HStack {
|
||||
VStack(alignment: .leading) {
|
||||
@ -194,7 +198,10 @@ extension Ghostty {
|
||||
|
||||
Text(verbatim: url)
|
||||
.padding(.init(top: padding, leading: padding, bottom: padding, trailing: padding))
|
||||
.background(.background)
|
||||
.background(
|
||||
RoundedRectangle(cornerRadius: 5)
|
||||
.fill(.background)
|
||||
)
|
||||
.lineLimit(1)
|
||||
.truncationMode(.middle)
|
||||
.opacity(isHoveringURLLeft ? 0 : 1)
|
||||
@ -204,6 +211,7 @@ extension Ghostty {
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding([.leading, .bottom], padding)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user