rework shadow

This commit is contained in:
spaced4ndy
2024-07-15 13:43:17 +04:00
parent 6107f8e28e
commit 78728263fb
7 changed files with 35 additions and 7 deletions

View File

@@ -33,7 +33,11 @@ struct ComposeFileView: View {
.padding(.vertical, 1)
.padding(.trailing, 12)
.frame(height: 50)
.background(theme.appColors.sentMessage)
.background(
theme.appColors.sentMessage
.shadow(color: .black.opacity(0.12), radius: 4, x: 0, y: 0)
.mask(Rectangle().padding(.bottom, -8))
)
.frame(maxWidth: .infinity)
.padding(.top, 8)
}

View File

@@ -45,7 +45,11 @@ struct ComposeImageView: View {
}
.padding(.vertical, 1)
.padding(.trailing, 12)
.background(theme.appColors.sentMessage)
.background(
theme.appColors.sentMessage
.shadow(color: .black.opacity(0.12), radius: 4, x: 0, y: 0)
.mask(Rectangle().padding(.bottom, -8))
)
.frame(maxWidth: .infinity)
.padding(.top, 8)
}

View File

@@ -62,7 +62,11 @@ struct ComposeLinkView: View {
}
.padding(.vertical, 1)
.padding(.trailing, 12)
.background(theme.appColors.sentMessage)
.background(
theme.appColors.sentMessage
.shadow(color: .black.opacity(0.12), radius: 4, x: 0, y: 0)
.mask(Rectangle().padding(.bottom, -8))
)
.frame(maxWidth: .infinity)
.padding(.top, 8)
}

View File

@@ -664,7 +664,11 @@ struct ComposeView: View {
.padding(12)
.frame(minHeight: 50)
.frame(maxWidth: .infinity, alignment: .leading)
.background(Color(uiColor: .tertiarySystemGroupedBackground))
.background(
Color(uiColor: .tertiarySystemGroupedBackground)
.shadow(color: .black.opacity(0.12), radius: 4, x: 0, y: 0)
.mask(Rectangle().padding(.bottom, -8))
)
.padding(.top, 8)
}

View File

@@ -50,7 +50,11 @@ struct ComposeVoiceView: View {
}
.padding(.vertical, 1)
.frame(height: ComposeVoiceView.previewHeight)
.background(theme.appColors.sentMessage)
.background(
theme.appColors.sentMessage
.shadow(color: .black.opacity(0.12), radius: 4, x: 0, y: 0)
.mask(Rectangle().padding(.bottom, -8))
)
.frame(maxWidth: .infinity)
.padding(.top, 8)
}

View File

@@ -20,7 +20,11 @@ struct ContextInvitingContactMemberView: View {
.padding(12)
.frame(minHeight: 50)
.frame(maxWidth: .infinity, alignment: .leading)
.background(theme.appColors.sentMessage)
.background(
theme.appColors.sentMessage
.shadow(color: .black.opacity(0.12), radius: 4, x: 0, y: 0)
.mask(Rectangle().padding(.bottom, -8))
)
.padding(.top, 8)
}
}

View File

@@ -45,7 +45,11 @@ struct ContextItemView: View {
.padding(12)
.frame(minHeight: 50)
.frame(maxWidth: .infinity)
.background(chatItemFrameColor(contextItem, theme))
.background(
chatItemFrameColor(contextItem, theme)
.shadow(color: .black.opacity(0.12), radius: 4, x: 0, y: 0)
.mask(Rectangle().padding(.bottom, -8))
)
.padding(.top, 8)
}