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>
@@ -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;64
const NARROW_BUBBLE_WIDTH: f32 = 300.;64
const NARROW_BUBBLE_WIDTH: f32 = 300.;65
const BUBBLE_PADDING_Y: f32 = 8.;65
const BUBBLE_PADDING_Y: f32 = 8.;66
const META_BOTTOM_INSET: f32 = 4.;66
const META_BOTTOM_INSET: f32 = 4.;67
const META_RIGHT_INSET: f32 = 8.;67
const META_SIZE: f32 = 11.;68
const META_SIZE: f32 = 11.;68
const META_CHECK_SIZE: f32 = 15.;69
const META_CHECK_SIZE: f32 = 15.;69
const SAVED_MARK_SIZE: f32 = 12.;70
const 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.469
fn meta_right_shift(jumbo: bool) -> f32 {470
if jumbo {471
META_RIGHT_INSET472
} else {473
META_RIGHT_INSET - BUBBLE_PADDING_X474
}475
}476
461
fn bubble_meta(row: &MessageRow, own: bool, saved: bool) -> Div {477
fn 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()