From 7cc59907110a7610c1a7ef64619ff4cde9776ada Mon Sep 17 00:00:00 2001 From: Nicolas Mauri Date: Tue, 28 Nov 2023 10:21:42 +0100 Subject: [PATCH] Fix the touch area size for the voice message button. (#2174) --- ElementX/Sources/Other/VoiceMessage/VoiceMessageButton.swift | 5 ++++- changelog.d/2038.bugfix | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2038.bugfix diff --git a/ElementX/Sources/Other/VoiceMessage/VoiceMessageButton.swift b/ElementX/Sources/Other/VoiceMessage/VoiceMessageButton.swift index ac23054d5..827a5c99c 100644 --- a/ElementX/Sources/Other/VoiceMessage/VoiceMessageButton.swift +++ b/ElementX/Sources/Other/VoiceMessage/VoiceMessageButton.swift @@ -53,7 +53,6 @@ struct VoiceMessageButton: View { .animation(nil, value: state) .buttonStyle(VoiceMessageButtonStyle()) .disabled(state == .loading) - .background(Circle().foregroundColor(.compound.bgCanvasDefault)) .accessibilityLabel(accessibilityLabel) } @@ -92,6 +91,10 @@ private struct VoiceMessageButtonStyle: ButtonStyle { func makeBody(configuration: Configuration) -> some View { configuration.label .foregroundColor(isEnabled ? .compound.textSecondary.opacity(configuration.isPressed ? 0.6 : 1) : .compound.iconDisabled) + .background( + Circle() + .foregroundColor(configuration.isPressed ? .compound.bgSubtlePrimary : .compound.bgCanvasDefault) + ) } } diff --git a/changelog.d/2038.bugfix b/changelog.d/2038.bugfix new file mode 100644 index 000000000..c9ce04bf9 --- /dev/null +++ b/changelog.d/2038.bugfix @@ -0,0 +1 @@ +Fix the touch area size for the voice message button.