mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Fix HDR UI bugs on iOS 27.0. (#6177)
This commit is contained in:
@@ -58,9 +58,12 @@ struct LoadableAvatarImage: View {
|
|||||||
private var clippedAvatar: some View {
|
private var clippedAvatar: some View {
|
||||||
avatar
|
avatar
|
||||||
.frame(width: frameSize, height: frameSize)
|
.frame(width: frameSize, height: frameSize)
|
||||||
.background(Color.compound.bgCanvasDefault)
|
.background {
|
||||||
|
Color.compound.bgCanvasDefault
|
||||||
|
.allowedDynamicRange(.standard) // Workaround an iOS 27.0 bug where full white goes HDR in a toolbar.
|
||||||
|
}
|
||||||
.avatarShape(shape, scaledSize: _frameSize)
|
.avatarShape(shape, scaledSize: _frameSize)
|
||||||
.allowedDynamicRange(.standard) // Prevent avatars from triggering HDR display.
|
.allowedDynamicRange(.standard) // Prevent loaded avatars from triggering HDR display.
|
||||||
.environment(\.shouldAutomaticallyLoadImages, true) // We always load avatars.
|
.environment(\.shouldAutomaticallyLoadImages, true) // We always load avatars.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ struct ToolbarButton: View {
|
|||||||
var tint: Color {
|
var tint: Color {
|
||||||
switch self {
|
switch self {
|
||||||
case .cancel:
|
case .cancel:
|
||||||
.compound.bgCanvasDefault
|
.clear
|
||||||
case .confirm:
|
case .confirm:
|
||||||
.compound.bgAccentRest
|
.compound.bgAccentRest
|
||||||
case .destructive:
|
case .destructive:
|
||||||
|
|||||||
Reference in New Issue
Block a user