@@ -481,6 +481,10 @@ class DateSeparator extends StatelessWidget {
481
481
Widget build (BuildContext context) {
482
482
final zulipLocalizations = ZulipLocalizations .of (context);
483
483
484
+ // This makes the small-caps text vertically centered,
485
+ // to align with the vertically centered divider lines.
486
+ const textBottomPadding = 2.0 ;
487
+
484
488
return ColoredBox (color: Colors .white,
485
489
child: Padding (
486
490
padding: const EdgeInsets .symmetric (vertical: 8 , horizontal: 2 ),
@@ -493,17 +497,14 @@ class DateSeparator extends StatelessWidget {
493
497
bottom: BorderSide (
494
498
width: 0 ,
495
499
color: Colors .black)))))),
496
- Padding (padding: const EdgeInsets .symmetric (horizontal : 2 ),
500
+ Padding (padding: const EdgeInsets .fromLTRB ( 2 , 0 , 2 , textBottomPadding ),
497
501
// TODO dedupe with RecipientHeaderDate
498
502
child: Text (
499
503
style: TextStyle (
500
504
color: _textColor,
501
505
fontFamily: 'Source Sans 3' ,
502
506
fontSize: 16 ,
503
- // In Figma this has a line-height of 19, but using 18
504
- // here to match the stream/topic text widgets helps
505
- // to align all the text to the same baseline.
506
- height: (18 / 16 ),
507
+ height: (16 / 16 ),
507
508
// This is equivalent to css `all-small-caps`, see:
508
509
// https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-caps#all-small-caps
509
510
fontFeatures: const [FontFeature .enable ('c2sc' ), FontFeature .enable ('smcp' )],
0 commit comments