Skip to content

Commit a5e6f38

Browse files
authored
fix: remove top padding from video and files thumbnails - WPB-23931 (#4466)
1 parent 989a2b7 commit a5e6f38

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

WireMessaging/Sources/WireMessagingUI/WireDrive/Components/AttachmentsPreviewView/WireDriveLargeDocumentPreviewView.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ struct WireDriveLargeDocumentPreviewView: View {
2626
private static let errorMessage = L10n.Localizable.Conversation.Message.Attachment.previewNotAvailable
2727
private static let downloadErrorMessage = L10n.Localizable.Conversation.Message.Attachment.unableToDownload
2828
private static let loadingMessage = L10n.Localizable.Conversation.Message.Attachment.loadingContent
29+
private static let previewCornerRadius = 10.0
2930

3031
let headerIcon: Image
3132
let headerText: String
@@ -42,7 +43,7 @@ struct WireDriveLargeDocumentPreviewView: View {
4243
progressColor: downloadError
4344
? ColorTheme.Base.error.color : ColorTheme.Base.primary(wireAccentColor).color
4445
) {
45-
VStack {
46+
VStack(spacing: 0) {
4647
WireDriveDocumentHeaderView(
4748
headerIcon: headerIcon,
4849
headerText: headerText,
@@ -65,7 +66,7 @@ struct WireDriveLargeDocumentPreviewView: View {
6566
}
6667
}
6768
}
68-
}
69+
}.background(ColorTheme.Backgrounds.surfaceVariant.color)
6970
}
7071
}
7172

@@ -95,7 +96,7 @@ struct WireDriveLargeDocumentPreviewView: View {
9596
.background(alignment: .top) {
9697
content()
9798
}
98-
.clipped()
99+
.clipShape(RoundedRectangle(cornerRadius: Self.previewCornerRadius))
99100
}
100101

101102
@ViewBuilder

WireMessaging/Sources/WireMessagingUI/WireDrive/Components/AttachmentsPreviewView/WireDriveLargeVideoPreviewView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct WireDriveLargeVideoPreviewView: View {
4848
progressColor: downloadError
4949
? ColorTheme.Base.error.color : ColorTheme.Base.primary(wireAccentColor).color
5050
) {
51-
VStack {
51+
VStack(spacing: 0) {
5252
WireDriveDocumentHeaderView(
5353
headerIcon: headerIcon,
5454
headerText: headerText,
@@ -76,7 +76,7 @@ struct WireDriveLargeVideoPreviewView: View {
7676
durationView(duration: duration)
7777
}
7878
}
79-
}
79+
}.background(ColorTheme.Backgrounds.surfaceVariant.color)
8080
}
8181
}
8282

0 commit comments

Comments
 (0)