From b7148fed065aa825f4be76dc5c99bca322eb9235 Mon Sep 17 00:00:00 2001 From: Levitating Pineapple Date: Wed, 4 Sep 2024 15:05:59 +0300 Subject: [PATCH] fix gradient --- .../Shared/Views/ChatList/UserPicker.swift | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/apps/ios/Shared/Views/ChatList/UserPicker.swift b/apps/ios/Shared/Views/ChatList/UserPicker.swift index 3f719c5dec..55326e43f6 100644 --- a/apps/ios/Shared/Views/ChatList/UserPicker.swift +++ b/apps/ios/Shared/Views/ChatList/UserPicker.swift @@ -36,7 +36,7 @@ struct UserPicker: View { } } else { userPickerRow(otherUsers) - .listRowInsets(EdgeInsets(top: 0, leading: 12, bottom: 0, trailing: 12)) + .listRowInsets(EdgeInsets(top: 1, leading: 12, bottom: 1, trailing: 12)) .listRowBackground(Color.clear) .listRowSeparator(.hidden) } @@ -125,20 +125,32 @@ struct UserPicker: View { .padding(.leading, 2) .padding(.trailing, 24) } - ZStack(alignment: .topTrailing) { + ZStack { if #available(iOS 16.0, *) { s.scrollIndicators(.hidden) } else { s } - LinearGradient( - colors: [.clear, theme.colors.background.asGroupedBackground(theme.base.mode)], - startPoint: .leading, - endPoint: .trailing - ) - .frame(width: 24, height: 35) + HStack(spacing: 0) { + LinearGradient( + colors: [.black, .clear], + startPoint: .leading, + endPoint: .trailing + ) + .frame(width: 24) + Color.clear + LinearGradient( + colors: [.clear, .black], + startPoint: .leading, + endPoint: .trailing + ) + .frame(width: 24) + } + .frame(height: 35) + .blendMode(.destinationOut) .allowsHitTesting(false) } + .compositingGroup() .padding(.top, -3) // to fit unread badge Spacer() Image(systemName: "chevron.right.circle")