Improves helder

This commit is contained in:
2026-10-05 09:24:25 +02:00
parent 8fafea4fc3
commit 336987d821
44 changed files with 3454 additions and 542 deletions
@@ -1,11 +1,11 @@
import SwiftUI
/// The frame every overlay sits in: a flat ink scrim (no blur) and a `panel` card with a hairline border,
/// radius 8 and the overlay shadow. `.inset` fills the window minus 34pt; `.sized` centres a fixed-width card
/// radius 8 and the overlay shadow. `.inset` fills the window minus 34pt, up to 1200pt wide; `.sized` centres a fixed-width card
/// at the top. A click on the scrim calls `onDismiss`.
public struct OverlayShell<Content: View>: View {
public enum Placement {
/// Search, Diff: the whole window minus the 34pt inset.
/// Search, Diff: the whole window minus the 34pt inset, at most `insetOverlayMaxWidth` wide.
case inset
/// A card of this width, top-aligned inside the inset.
case sized(width: CGFloat)
@@ -36,7 +36,7 @@ public struct OverlayShell<Content: View>: View {
switch placement {
case .inset:
OverlayCard { content }
.frame(maxWidth: .infinity, maxHeight: .infinity)
.frame(maxWidth: Metrics.insetOverlayMaxWidth, maxHeight: .infinity)
case let .sized(width):
OverlayCard { content }
.frame(width: width)