macos: restore overlay close button

This commit is contained in:
Peter Steinberger
2025-12-08 21:40:12 +00:00
parent fce04b9424
commit ad3254deb6

View File

@@ -571,6 +571,26 @@ private final class ClickCatcher: NSView {
}
}
private struct CloseHoverButton: View {
var onClose: () -> Void
var body: some View {
Button(action: self.onClose) {
Image(systemName: "xmark")
.font(.system(size: 12, weight: .bold))
.foregroundColor(Color.white.opacity(0.85))
.frame(width: 22, height: 22)
.background(Color.black.opacity(0.35))
.clipShape(Circle())
.shadow(color: Color.black.opacity(0.35), radius: 6, y: 2)
}
.buttonStyle(.plain)
.focusable(false)
.contentShape(Circle())
.padding(6)
}
}
private struct CloseButtonOverlay: View {
var isVisible: Bool
var onHover: (Bool) -> Void