From 91547939f349886a9e232fd2eb6e2e0f827c916e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Dombiak?= Date: Tue, 20 Dec 2022 14:14:00 -0800 Subject: [PATCH] Change background color and text color to improve text readability for visually impaired prompt. Closes #732 --- .../Scene/ComposeContent/Attachment/AttachmentView.swift | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentView.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentView.swift index edf05b49c..a55bb5c0b 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentView.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentView.swift @@ -46,12 +46,15 @@ public struct AttachmentView: View { } }() Spacer() - TextField(placeholder, text: $viewModel.caption) + TextField("", text: $viewModel.caption) .lineLimit(1) .textFieldStyle(.plain) .foregroundColor(.white) - .placeholder(placeholder, when: viewModel.caption.isEmpty) - .padding(8) + .background(Color.black.opacity(0.4)) + .placeholder(when: viewModel.caption.isEmpty) { + Text(placeholder).foregroundColor(.white) + } + .padding(6) } )