BlueGit

ict rusty-teams

fix(chat): align all ticks on one vertical line

- Inline, below-content and big-emoji metas end 8 px from the bubble edge
- Before: 8 px inline, 12 px below content, 0 px under a big emoji

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-11-17 · 2 weeks ago

Hash
6f0368b346c06a2411675bfb29fefd69e7a15d0f
Parent
4ca4b6ab
1 file changed +18 −2
crates/app/src/views/message_row.rs +18 −2
@@ -64,6 +64,7 @@ const MAX_WIDTH_RATIO: f32 = 0.7;
64 64 const NARROW_BUBBLE_WIDTH: f32 = 300.;
65 65 const BUBBLE_PADDING_Y: f32 = 8.;
66 66 const META_BOTTOM_INSET: f32 = 4.;
67 const META_RIGHT_INSET: f32 = 8.;
67 68 const META_SIZE: f32 = 11.;
68 69 const META_CHECK_SIZE: f32 = 15.;
69 70 const SAVED_MARK_SIZE: f32 = 12.;
@@ -374,18 +375,24 @@ fn bubble(
374 375 h_flex()
375 376 .flex_none()
376 377 .mb(px(META_BOTTOM_INSET - bubble_padding_y(extras.compact)))
378 .mr(px(meta_right_shift(jumbo.is_some())))
377 379 .child(bubble_meta(row, own, saved)),
378 380 ),
379 381 );
380 382 } else if !meta_inline {
381 content = content.child(h_flex().justify_end().child(bubble_meta(row, own, saved)));
383 content = content.child(
384 h_flex()
385 .justify_end()
386 .mr(px(meta_right_shift(jumbo.is_some())))
387 .child(bubble_meta(row, own, saved)),
388 );
382 389 }
383 390 element = element.child(content);
384 391 if meta_inline {
385 392 element = element.child(
386 393 div()
387 394 .absolute()
388 .right(px(8.))
395 .right(px(META_RIGHT_INSET))
389 396 .bottom(px(META_BOTTOM_INSET))
390 397 .child(bubble_meta(row, own, saved)),
391 398 );
@@ -458,6 +465,15 @@ pub(super) fn forwarded_header() -> Div {
458 465 .child("Forwarded")
459 466 }
460 467
468 /// Every time and tick ends `META_RIGHT_INSET` from the bubble edge, inside a padded bubble or under a big emoji.
469 fn meta_right_shift(jumbo: bool) -> f32 {
470 if jumbo {
471 META_RIGHT_INSET
472 } else {
473 META_RIGHT_INSET - BUBBLE_PADDING_X
474 }
475 }
476
461 477 fn bubble_meta(row: &MessageRow, own: bool, saved: bool) -> Div {
462 478 let tint = if own {
463 479 theme::own_meta()
@@ -64,6 +64,7 @@ const MAX_WIDTH_RATIO: f32 = 0.7;
64const NARROW_BUBBLE_WIDTH: f32 = 300.;
64const NARROW_BUBBLE_WIDTH: f32 = 300.;
65const BUBBLE_PADDING_Y: f32 = 8.;
65const BUBBLE_PADDING_Y: f32 = 8.;
66const META_BOTTOM_INSET: f32 = 4.;
66const META_BOTTOM_INSET: f32 = 4.;
67const META_RIGHT_INSET: f32 = 8.;
67const META_SIZE: f32 = 11.;
68const META_SIZE: f32 = 11.;
68const META_CHECK_SIZE: f32 = 15.;
69const META_CHECK_SIZE: f32 = 15.;
69const SAVED_MARK_SIZE: f32 = 12.;
70const SAVED_MARK_SIZE: f32 = 12.;
@@ -374,18 +375,24 @@ fn bubble(
374 h_flex()
375 h_flex()
375 .flex_none()
376 .flex_none()
376 .mb(px(META_BOTTOM_INSET - bubble_padding_y(extras.compact)))
377 .mb(px(META_BOTTOM_INSET - bubble_padding_y(extras.compact)))
378 .mr(px(meta_right_shift(jumbo.is_some())))
377 .child(bubble_meta(row, own, saved)),
379 .child(bubble_meta(row, own, saved)),
378 ),
380 ),
379 );
381 );
380 } else if !meta_inline {
382 } else if !meta_inline {
381 content = content.child(h_flex().justify_end().child(bubble_meta(row, own, saved)));
383 content = content.child(
384 h_flex()
385 .justify_end()
386 .mr(px(meta_right_shift(jumbo.is_some())))
387 .child(bubble_meta(row, own, saved)),
388 );
382 }
389 }
383 element = element.child(content);
390 element = element.child(content);
384 if meta_inline {
391 if meta_inline {
385 element = element.child(
392 element = element.child(
386 div()
393 div()
387 .absolute()
394 .absolute()
388 .right(px(8.))
395 .right(px(META_RIGHT_INSET))
389 .bottom(px(META_BOTTOM_INSET))
396 .bottom(px(META_BOTTOM_INSET))
390 .child(bubble_meta(row, own, saved)),
397 .child(bubble_meta(row, own, saved)),
391 );
398 );
@@ -458,6 +465,15 @@ pub(super) fn forwarded_header() -> Div {
458 .child("Forwarded")
465 .child("Forwarded")
459}
466}
460
467
468/// Every time and tick ends `META_RIGHT_INSET` from the bubble edge, inside a padded bubble or under a big emoji.
469fn meta_right_shift(jumbo: bool) -> f32 {
470 if jumbo {
471 META_RIGHT_INSET
472 } else {
473 META_RIGHT_INSET - BUBBLE_PADDING_X
474 }
475}
476
461fn bubble_meta(row: &MessageRow, own: bool, saved: bool) -> Div {
477fn bubble_meta(row: &MessageRow, own: bool, saved: bool) -> Div {
462 let tint = if own {
478 let tint = if own {
463 theme::own_meta()
479 theme::own_meta()