Skip to content

fix(messenger): centre system message text on the info glyph - #1803

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/messenger-system-message-alignment
Oct 17, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
fix/messenger-system-message-alignment

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

System message text sat about 3dp above the info glyph beside it.

SystemMessageRow centres the glyph in a box one caption line (18sp) tall. Compose's default LineHeightStyle trims the top of the first line, so the text's first line box was shorter than the glyph's and the text started higher.

The text now uses LineHeightStyle(Alignment.Center, Trim.None): every line keeps its full 18sp box with the text centred in it. That matches iOS's ChatSystemMessageCell, which fixes the line height at 18pt and centres the font with a baseline offset. Rows get about 3dp taller, which brings them in line with iOS.

Checked with a Robolectric render of one-line and wrapped messages, before and after.

The glyph is centred in an 18sp box beside the first line, but Compose's
default line height style trims the first line's top, so the caption sat about
3dp above the glyph.

Centre the text in untrimmed 18sp line boxes, which is what iOS's
ChatSystemMessageCell does with its baseline offset. Rows grow by about 3dp to
match iOS.
@bmc08gt bmc08gt self-assigned this Oct 17, 2026
@github-actions github-actions Bot added the type: fix Bug fix label Oct 17, 2026
@bmc08gt
bmc08gt merged commit 8eafa52 into code/cash Oct 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant