Skip to content

Commit 3dd1ea6

Browse files
committed
Fix adaptive semantic colors in samples.
1 parent fc11595 commit 3dd1ea6

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

Shared/Samples/Animate 3D graphic/Animate3DGraphicView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct Animate3DGraphicView: View {
4242
StatRow("Roll", value: model.animation.currentFrame.roll.formatted(.angle))
4343
}
4444
.frame(width: 170, height: 100)
45-
.background(Color.white.opacity(0.5))
45+
.background(.ultraThinMaterial)
4646
.cornerRadius(10)
4747
.shadow(radius: 3)
4848
}

Shared/Samples/Display dimensions/DisplayDimensionsView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct DisplayDimensionsView: View {
5353
))
5454
}
5555
.padding(8)
56-
.background(Color.white)
56+
.background(.ultraThinMaterial)
5757
.cornerRadius(10)
5858
.disabled(dimensionLayer == nil)
5959
}

Shared/Samples/Identify KML features/IdentifyKMLFeaturesView.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ private extension IdentifyKMLFeaturesView {
127127
)
128128

129129
// Update the callout text.
130-
calloutText = AttributedString(text)
130+
var attributedText = AttributedString(text)
131+
attributedText.foregroundColor = .label
132+
calloutText = attributedText
131133
}
132134
}
133135

Shared/Samples/Show mobile map package expiration date/ShowMobileMapPackageExpirationDateView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct ShowMobileMapPackageExpirationDateView: View {
5454
}
5555
.multilineTextAlignment(.center)
5656
.padding()
57-
.background(.white)
57+
.background(.thinMaterial)
5858
}
5959
}
6060
.alert(isPresented: $isShowingErrorAlert, presentingError: error)

0 commit comments

Comments
 (0)