|
@@ -158,6 +158,10 @@ struct Screenshot: View {
|
|
|
let large: Bool
|
|
|
@EnvironmentObject private var data: UTMData
|
|
|
|
|
|
+ @Environment(\.colorScheme) private var colorScheme
|
|
|
+ private let darkOverlay = Color(red: 75/255, green: 74/255, blue: 77/255)
|
|
|
+ private let lightOverlay = Color(red: 230/255, green: 229/255, blue: 235/255)
|
|
|
+
|
|
|
var body: some View {
|
|
|
ZStack {
|
|
|
Rectangle()
|
|
@@ -174,8 +178,9 @@ struct Screenshot: View {
|
|
|
#endif
|
|
|
}
|
|
|
Rectangle()
|
|
|
- .fill(Color(red: 230/255, green: 229/255, blue: 235/255))
|
|
|
- .blendMode(.hardLight)
|
|
|
+ .fill(colorScheme == .dark ? darkOverlay : lightOverlay)
|
|
|
+ .blendMode(colorScheme == .dark ? .multiply : .hardLight)
|
|
|
+ .optionalBackgroundExtensionEffect()
|
|
|
#if os(visionOS)
|
|
|
.overlay {
|
|
|
if vm.isStopped || vm.isTakeoverAllowed {
|
|
@@ -197,7 +202,7 @@ struct Screenshot: View {
|
|
|
Label("Run", systemImage: "play.circle.fill")
|
|
|
.labelStyle(.iconOnly)
|
|
|
.font(Font.system(size: 96))
|
|
|
- .foregroundColor(Color.black)
|
|
|
+ .foregroundColor(.primary)
|
|
|
}).buttonStyle(.plain)
|
|
|
#endif
|
|
|
}
|
|
@@ -208,6 +213,17 @@ struct Screenshot: View {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+private extension View {
|
|
|
+ @ViewBuilder
|
|
|
+ func optionalBackgroundExtensionEffect() -> some View {
|
|
|
+ if #available(iOS 26, macOS 26, visionOS 26, *) {
|
|
|
+ self.backgroundExtensionEffect()
|
|
|
+ } else {
|
|
|
+ self
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
struct Details: View {
|
|
|
@ObservedObject var vm: VMData
|
|
|
let sizeLabel: String
|