fix(launch): drei Layer weißen Flash beim Start gefixt
System-Launch-Screen war default-weiß (UILaunchScreen leer), WKWebView malt vor first paint opaque weiß, und das HTML selbst hat keinen Background bevor das CSS-Bundle lädt. Alle drei Layer jetzt auf den Paper-Theme-Background gesetzt — sRGB-konvertiert aus `--color-background` in mana/packages/themes/paper.css. - LaunchBackground.colorset mit Light + Dark Variante - project.yml: UILaunchScreen.UIColorName: LaunchBackground - WKWebView: isOpaque=false + clear backgrounds (iOS), drawsBackground=false (macOS) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2616c4f440
commit
cbc9af6bb0
3 changed files with 54 additions and 1 deletions
|
|
@ -112,6 +112,12 @@ final class WebNavState {
|
|||
webView.navigationDelegate = context.coordinator
|
||||
webView.uiDelegate = context.coordinator
|
||||
webView.allowsBackForwardNavigationGestures = true
|
||||
// Ohne diese drei flackert WKWebView bis zum first paint weiß
|
||||
// gegen das Paper-Theme — egal was die SwiftUI-Hülle als
|
||||
// Background setzt.
|
||||
webView.isOpaque = false
|
||||
webView.backgroundColor = .clear
|
||||
webView.scrollView.backgroundColor = .clear
|
||||
webView.scrollView.refreshControl = makeRefreshControl(
|
||||
webView: webView,
|
||||
coordinator: context.coordinator
|
||||
|
|
@ -162,6 +168,9 @@ final class WebNavState {
|
|||
webView.navigationDelegate = context.coordinator
|
||||
webView.uiDelegate = context.coordinator
|
||||
webView.allowsBackForwardNavigationGestures = true
|
||||
// macOS-Pendant zu UIView.isOpaque=false — sonst weißer
|
||||
// Flash vor first paint.
|
||||
webView.setValue(false, forKey: "drawsBackground")
|
||||
context.coordinator.observe(webView: webView)
|
||||
context.coordinator.load(target.url, into: webView)
|
||||
return webView
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue