Skip to content

compose: Shrink "send" button to match content-input height, like before M3 #399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions lib/widgets/compose_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -761,12 +761,15 @@ class _SendButtonState extends State<_SendButton> {
),
child: IconButton(
tooltip: zulipLocalizations.composeBoxSendTooltip,

// Match the height of the content input. Zeroing the padding lets the
// constraints take over.
constraints: const BoxConstraints(minWidth: _sendButtonSize, minHeight: _sendButtonSize),
padding: const EdgeInsets.all(0),

style: const ButtonStyle(
// Match the height of the content input.
minimumSize: MaterialStatePropertyAll(Size.square(_sendButtonSize)),
// With the default of [MaterialTapTargetSize.padded], not just the
// tap target but the visual button would get padded to 48px square.
// It would be nice if the tap target extended invisibly out from the
// button, to make a 48px square, but that's not the behavior we get.
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
color: foregroundColor,
icon: const Icon(Icons.send),
onPressed: _send));
Expand Down