designs are perfect now

This commit is contained in:
Mauro Romito
2022-10-17 17:03:43 +02:00
parent 7e54214ea3
commit ef5043baf0
@@ -40,13 +40,21 @@ struct Composer: View {
}
private var cornerRadius: CGFloat {
viewModel.viewState.shouldDisplayContext ? 14 : borderHeight / 2
if viewModel.viewState.shouldDisplayContext || wysiwygViewModel.idealHeight > minTextViewHeight + 2 {
return 14
} else {
return borderHeight / 2
}
}
private var actionButtonAccessibilityIdentifier: String {
viewModel.viewState.sendMode == .edit ? "editButton" : "sendButton"
}
private var borderColor: Color {
focused ? theme.colors.quarterlyContent : theme.colors.quinaryContent
}
private var formatItems: [FormatItem] {
FormatType.allCases.map { type in
FormatItem(
@@ -122,7 +130,7 @@ struct Composer: View {
.padding(.bottom, verticalPadding)
}
.clipShape(rect)
.overlay(rect.stroke(theme.colors.quinaryContent, lineWidth: 1))
.overlay(rect.stroke(borderColor, lineWidth: 1))
.padding(.horizontal, horizontalPadding)
.padding(.top, 8)
.onTapGesture {