Centralize overlay colors in the app palette
This commit is contained in:
@@ -249,7 +249,7 @@ struct OverlayHost: View {
|
||||
var body: some View {
|
||||
ZStack(alignment: .topLeading) {
|
||||
if let switcher = overlays.switcher {
|
||||
Color.black.opacity(0.35)
|
||||
Palette.overlayBackdrop
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
switcher.close()
|
||||
@@ -257,7 +257,7 @@ struct OverlayHost: View {
|
||||
SwitcherPlacement(model: switcher)
|
||||
}
|
||||
if let image = overlays.image {
|
||||
Color.black.opacity(0.6)
|
||||
Palette.imageBackdrop
|
||||
.onTapGesture {
|
||||
overlays.image = nil
|
||||
}
|
||||
@@ -283,7 +283,7 @@ struct OverlayHost: View {
|
||||
.padding(4)
|
||||
.background(Palette.raised, in: RoundedRectangle(cornerRadius: 6))
|
||||
.overlay(RoundedRectangle(cornerRadius: 6).stroke(Palette.border))
|
||||
.shadow(color: overlayShadow, radius: 14, y: 8)
|
||||
.shadow(color: Palette.overlayShadow, radius: 14, y: 8)
|
||||
.environment(\.paneAccent, menu.accent)
|
||||
.onHover { inside in
|
||||
overlays.menuHover = inside
|
||||
@@ -292,14 +292,14 @@ struct OverlayHost: View {
|
||||
.offset(x: menu.anchor.minX, y: menu.anchor.maxY + 4)
|
||||
}
|
||||
if let m = overlays.modal {
|
||||
Color.black.opacity(0.35)
|
||||
Palette.overlayBackdrop
|
||||
.contentShape(Rectangle())
|
||||
ModalPlacement(modal: m, pane: overlays.paneFrame) { value in
|
||||
overlays.answerModal(value)
|
||||
}
|
||||
}
|
||||
if let alert = overlays.alerts.last {
|
||||
Color.black.opacity(0.35)
|
||||
Palette.overlayBackdrop
|
||||
.contentShape(Rectangle())
|
||||
GeometryReader { g in
|
||||
AlertBox(alert: alert, maxText: max(60, g.size.height - 48 - 90)) {
|
||||
@@ -432,7 +432,7 @@ private struct ModalBox: View {
|
||||
.frame(maxWidth: 520)
|
||||
.background(Palette.raised, in: RoundedRectangle(cornerRadius: 10))
|
||||
.overlay(RoundedRectangle(cornerRadius: 10).stroke(Palette.border))
|
||||
.shadow(color: overlayShadow, radius: 14, y: 8)
|
||||
.shadow(color: Palette.overlayShadow, radius: 14, y: 8)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ private struct AlertBox: View {
|
||||
.frame(maxWidth: 520)
|
||||
.background(Palette.raised, in: RoundedRectangle(cornerRadius: 10))
|
||||
.overlay(RoundedRectangle(cornerRadius: 10).stroke(Palette.border))
|
||||
.shadow(color: overlayShadow, radius: 14, y: 8)
|
||||
.shadow(color: Palette.overlayShadow, radius: 14, y: 8)
|
||||
.padding(24)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user