Browse Source

dms: fix input box padding and spacing

Signed-off-by: William Casarin <jb55@jb55.com>
profiles-everywhere
William Casarin 3 years ago
parent
commit
ef5f92fe21
  1. 14
      damus/Views/DMChatView.swift

14
damus/Views/DMChatView.swift

@ -49,14 +49,14 @@ struct DMChatView: View {
var InputField: some View { var InputField: some View {
TextField("New Message", text: $message) TextField("New Message", text: $message)
.padding([.leading], 12) .padding([.leading, .trailing], 12)
.padding([.top, .bottom], 8) .padding([.top, .bottom], 8)
.background { .background {
InputBackground() InputBackground()
} }
.foregroundColor(Color.primary) .foregroundColor(Color.primary)
.cornerRadius(20) .cornerRadius(20)
.padding([.leading, .top, .bottom], 8) .padding(8)
} }
@Environment(\.colorScheme) var colorScheme @Environment(\.colorScheme) var colorScheme
@ -81,12 +81,14 @@ struct DMChatView: View {
ZStack { ZStack {
BackgroundColor() BackgroundColor()
HStack { HStack(spacing: 0) {
InputField InputField
Button(role: .none, action: send_message) { if !message.isEmpty {
Label("", systemImage: "arrow.right.circle") Button(role: .none, action: send_message) {
.font(.title) Label("", systemImage: "arrow.right.circle")
.font(.title)
}
} }
} }
} }

Loading…
Cancel
Save