@@ -670,18 +670,28 @@ class DmRecipientHeader extends StatelessWidget {
670
670
onTap: () => Navigator .push (context,
671
671
MessageListPage .buildRoute (context: context,
672
672
narrow: DmNarrow .ofMessage (message, selfUserId: store.account.userId))),
673
- child: DecoratedBox (
674
- decoration: BoxDecoration (
675
- color: Colors .white,
676
- border: Border .all (color: _kDmRecipientHeaderColor)),
677
- child: Row (mainAxisAlignment: MainAxisAlignment .spaceBetween, children: [
678
- RecipientHeaderChevronContainer (
679
- color: _kDmRecipientHeaderColor,
680
- child: Text (style: const TextStyle (color: Colors .white),
681
- title)),
682
- RecipientHeaderDate (message: message,
683
- color: _kDmRecipientHeaderDateColor),
684
- ])));
673
+ child: ColoredBox (
674
+ color: _kDmRecipientHeaderColor,
675
+ child: Padding (
676
+ padding: const EdgeInsets .symmetric (vertical: 11 ),
677
+ child: Row (
678
+ crossAxisAlignment: CrossAxisAlignment .center,
679
+ children: [
680
+ const Padding (
681
+ padding: EdgeInsets .symmetric (horizontal: 6 ),
682
+ child: Icon (size: 16 , ZulipIcons .user)),
683
+ Expanded (
684
+ child: Text (title,
685
+ style: const TextStyle (
686
+ fontFamily: 'Source Sans 3' ,
687
+ fontSize: 16 ,
688
+ letterSpacing: 0.02 * 16 ,
689
+ height: (18 / 16 ),
690
+ ).merge (weightVariableTextStyle (context, wght: 600 , wghtIfPlatformRequestsBold: 900 )),
691
+ overflow: TextOverflow .ellipsis)),
692
+ RecipientHeaderDate (message: message,
693
+ color: _kDmRecipientHeaderDateColor),
694
+ ]))));
685
695
}
686
696
}
687
697
@@ -721,29 +731,6 @@ class RecipientHeaderDate extends StatelessWidget {
721
731
722
732
final _kRecipientHeaderDateFormat = DateFormat ('y-MM-dd' , 'en_US' ); // TODO(#278)
723
733
724
- /// A widget with the distinctive chevron-tailed shape in Zulip recipient headers.
725
- class RecipientHeaderChevronContainer extends StatelessWidget {
726
- const RecipientHeaderChevronContainer (
727
- {super .key, required this .color, required this .child});
728
-
729
- final Color color;
730
- final Widget child;
731
-
732
- @override
733
- Widget build (BuildContext context) {
734
- const chevronLength = 5.0 ;
735
- const recipientBorderShape = BeveledRectangleBorder (
736
- borderRadius: BorderRadius .only (
737
- topRight: Radius .elliptical (chevronLength, double .infinity),
738
- bottomRight: Radius .elliptical (chevronLength, double .infinity)));
739
- return Container (
740
- decoration: ShapeDecoration (color: color, shape: recipientBorderShape),
741
- padding: const EdgeInsets .only (right: chevronLength),
742
- child: Padding (
743
- padding: const EdgeInsets .fromLTRB (16 , 4 , 6 , 3 ), child: child));
744
- }
745
- }
746
-
747
734
/// A Zulip message, showing the sender's name and avatar if specified.
748
735
class MessageWithPossibleSender extends StatelessWidget {
749
736
const MessageWithPossibleSender ({super .key, required this .item});
0 commit comments