diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentView.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentView.swift index edf05b49c..713ee4d2a 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentView.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentView.swift @@ -46,12 +46,32 @@ public struct AttachmentView: View { } }() Spacer() - TextField(placeholder, text: $viewModel.caption) - .lineLimit(1) - .textFieldStyle(.plain) - .foregroundColor(.white) - .placeholder(placeholder, when: viewModel.caption.isEmpty) - .padding(8) + ZStack(alignment: .bottom) { + Rectangle() + .fill( + LinearGradient( + colors: [.black.opacity(0.0), .black.opacity(1.0)], + startPoint: .top, + endPoint: .bottom + ) + ) + .frame(height: 80) + + TextField("", text: $viewModel.caption) + .lineLimit(1) + .textFieldStyle(.plain) + .font(.footnote) + .foregroundColor(Color(UIColor.white.withAlphaComponent(0.8))) + .padding(EdgeInsets(top: 0, leading: 8, bottom: 0, trailing: 4)) + .placeholder(when: viewModel.caption.isEmpty) { + Text(placeholder) + .font(.footnote) + .foregroundColor(Color(UIColor.white.withAlphaComponent(0.8))) + .padding(EdgeInsets(top: 0, leading: 8, bottom: 0, trailing: 4)) + .lineLimit(1) + } + .padding(EdgeInsets(top: 6, leading: 0, bottom: 10, trailing: 0)) + } } )