mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 18:42:47 +02:00
centring the toggle button when the corner radius is half
This commit is contained in:
@@ -43,13 +43,17 @@ struct Composer: View {
|
||||
}
|
||||
|
||||
private var cornerRadius: CGFloat {
|
||||
if viewModel.viewState.shouldDisplayContext || wysiwygViewModel.idealHeight > wysiwygViewModel.minHeight {
|
||||
if shouldFixRoundCorner {
|
||||
return 14
|
||||
} else {
|
||||
return borderHeight / 2
|
||||
}
|
||||
}
|
||||
|
||||
private var shouldFixRoundCorner: Bool {
|
||||
viewModel.viewState.shouldDisplayContext || wysiwygViewModel.idealHeight > wysiwygViewModel.minHeight
|
||||
}
|
||||
|
||||
private var actionButtonAccessibilityIdentifier: String {
|
||||
viewModel.viewState.sendMode == .edit ? "editButton" : "sendButton"
|
||||
}
|
||||
@@ -103,7 +107,7 @@ struct Composer: View {
|
||||
.padding(.top, 8)
|
||||
.padding(.horizontal, horizontalPadding)
|
||||
}
|
||||
HStack(alignment: .top, spacing: 0) {
|
||||
HStack(alignment: shouldFixRoundCorner ? .top : .center, spacing: 0) {
|
||||
WysiwygComposerView(
|
||||
focused: $viewModel.focused,
|
||||
viewModel: wysiwygViewModel
|
||||
|
||||
Reference in New Issue
Block a user