Backport base Form style from Compound. (#1009)

Apply to all screens using the formBackground colour.
This commit is contained in:
Doug
2023-06-02 11:39:03 +01:00
committed by GitHub
parent 0972af30cf
commit 44062adb0f
8 changed files with 21 additions and 37 deletions
@@ -28,8 +28,7 @@ struct CreateRoomScreen: View {
var body: some View {
mainContent
.scrollDismissesKeyboard(.immediately)
.scrollContentBackground(.hidden)
.background(Color.element.formBackground.ignoresSafeArea())
.elementFormStyle()
.navigationTitle(L10n.screenCreateRoomTitle)
.navigationBarTitleDisplayMode(.inline)
.toolbar {
@@ -85,8 +85,7 @@ struct DeveloperOptionsScreen: View {
}
}
.overlay(effectsView)
.scrollContentBackground(.hidden)
.background(Color.element.formBackground.ignoresSafeArea())
.elementFormStyle()
.navigationTitle(L10n.commonDeveloperOptions)
.navigationBarTitleDisplayMode(.inline)
}
@@ -22,8 +22,7 @@ struct InviteUsersScreen: View {
var body: some View {
mainContent
.scrollContentBackground(.hidden)
.background(Color.element.formBackground.ignoresSafeArea())
.elementFormStyle()
.navigationTitle(L10n.screenCreateRoomActionInvitePeople)
.navigationBarTitleDisplayMode(.inline)
.toolbar {
@@ -27,8 +27,7 @@ struct RoomDetailsEditScreen: View {
var body: some View {
mainContent
.scrollContentBackground(.hidden)
.background(Color.element.formBackground.ignoresSafeArea())
.elementFormStyle()
.scrollDismissesKeyboard(.immediately)
.navigationTitle(L10n.screenRoomDetailsEditRoomTitle)
.navigationBarTitleDisplayMode(.inline)
@@ -41,8 +41,7 @@ struct RoomDetailsScreen: View {
leaveRoomSection
}
}
.scrollContentBackground(.hidden)
.background(Color.element.formBackground.ignoresSafeArea())
.elementFormStyle()
.alert(item: $context.alertInfo) { $0.alert }
.alert(item: $context.leaveRoomAlertItem,
actions: leaveRoomAlertActions,
@@ -27,8 +27,7 @@ struct RoomMemberDetailsScreen: View {
blockUserSection
}
}
.scrollContentBackground(.hidden)
.background(Color.element.formBackground.ignoresSafeArea())
.elementFormStyle()
.alert(item: $context.ignoreUserAlert, actions: blockUserAlertActions, message: blockUserAlertMessage)
.errorAlert(item: $context.errorAlert)
}
@@ -28,8 +28,7 @@ struct StartChatScreen: View {
searchContent
}
}
.scrollContentBackground(.hidden)
.background(Color.element.formBackground.ignoresSafeArea())
.elementFormStyle()
.navigationTitle(L10n.actionStartChat)
.navigationBarTitleDisplayMode(.inline)
.toolbar {