diff --git a/Tusker/Screens/Compose/ComposeEmojiTextField.swift b/Tusker/Screens/Compose/ComposeEmojiTextField.swift index 6d363ec7..add3b4d1 100644 --- a/Tusker/Screens/Compose/ComposeEmojiTextField.swift +++ b/Tusker/Screens/Compose/ComposeEmojiTextField.swift @@ -120,6 +120,7 @@ struct ComposeEmojiTextField: UIViewRepresentable { } func textFieldDidEndEditing(_ textField: UITextField) { + uiState.currentInput = nil updateAutocompleteState(textField: textField) didEndEditing?() } diff --git a/Tusker/Screens/Compose/ComposeToolbar.swift b/Tusker/Screens/Compose/ComposeToolbar.swift index 32d869c7..8cecb2e6 100644 --- a/Tusker/Screens/Compose/ComposeToolbar.swift +++ b/Tusker/Screens/Compose/ComposeToolbar.swift @@ -26,22 +26,24 @@ struct ComposeToolbar: View { var body: some View { ScrollView(.horizontal, showsIndicators: false) { - HStack(spacing: 8) { + HStack(spacing: 0) { Button("CW") { draft.contentWarningEnabled.toggle() } .accessibilityLabel(draft.contentWarningEnabled ? "Remove content warning" : "Add content warning") + .padding(5) + .hoverEffect() MenuPicker(selection: $draft.visibility, options: Self.visibilityOptions, buttonStyle: .iconOnly) - // the button has a bunch of extra space by default, but combined with what we add it's too much - .padding(.horizontal, -8) +// // the button has a bunch of extra space by default, but combined with what we add it's too much +// .padding(.horizontal, -8) if mastodonController.instanceFeatures.localOnlyPosts { MenuPicker(selection: $draft.localOnly, options: [ .init(value: true, title: "Local-only", subtitle: "Only \(mastodonController.accountInfo!.instanceURL.host!)", image: UIImage(named: "link.broken")), .init(value: false, title: "Federated", image: UIImage(systemName: "link")) ], buttonStyle: .iconOnly) - .padding(.horizontal, -8) +// .padding(.horizontal, -8) } if let currentInput = uiState.currentInput, currentInput.toolbarElements.contains(.emojiPicker) { @@ -50,6 +52,8 @@ struct ComposeToolbar: View { } .labelStyle(.iconOnly) .font(.system(size: imageSize)) + .padding(5) + .hoverEffect() } if let currentInput = uiState.currentInput, @@ -68,6 +72,8 @@ struct ComposeToolbar: View { } } .accessibilityLabel(format.accessibilityLabel) + .padding(5) + .hoverEffect() } } @@ -76,6 +82,8 @@ struct ComposeToolbar: View { Button(action: self.draftsButtonPressed) { Text("Drafts") } + .padding(5) + .hoverEffect() } .padding(.horizontal, 16) .frame(minWidth: minWidth) diff --git a/Tusker/Views/MenuPicker.swift b/Tusker/Views/MenuPicker.swift index f452b5df..539c816f 100644 --- a/Tusker/Views/MenuPicker.swift +++ b/Tusker/Views/MenuPicker.swift @@ -44,6 +44,7 @@ struct MenuPicker: UIViewRepresentable { } }) button.accessibilityLabel = selectedOption.accessibilityLabel ?? selectedOption.title + button.isPointerInteractionEnabled = buttonStyle == .iconOnly } struct Option {