Use dark theme for Element Call (#5860)

* Use dark theme for element Call

* Make sure only the call screen is shown in dark mode.

Otherwise when you go into PiP the entire app has become dark.

---------

Co-authored-by: Doug <douglase@element.io>
This commit is contained in:
Timo
2026-07-13 14:28:28 +02:00
committed by GitHub
parent c69ebd8898
commit 3ba5c08c13
2 changed files with 4 additions and 1 deletions
@@ -26,6 +26,9 @@ struct CallScreen: View {
.toolbar { toolbar }
}
.alert(item: $context.alertInfo)
// Force dark mode for calls. Don't use .preferredColorScheme
// otherwise the whole app changes, visible when using the PiP.
.environment(\.colorScheme, .dark)
}
@ViewBuilder
@@ -102,7 +102,7 @@ final class ElementCallWidgetDriver: WidgetCapabilitiesProvider, ElementCallWidg
}
let languageTag = "\(Locale.current.language.languageCode ?? "en")-\(Locale.current.language.region ?? "US")"
let theme = colorScheme == .light ? "light" : "dark"
let theme = "dark"
let urlString: String
do {