Skip to content

Commit d7ee48a

Browse files
committed
msglist: Adjust text styles in MessageWithPossibleSender
Styles referenced from: https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=0%3A1&mode=dev
1 parent fe4655f commit d7ee48a

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

lib/widgets/message_list.dart

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,12 @@ class MessageWithPossibleSender extends StatelessWidget {
880880
ProfilePage.buildRoute(context: context,
881881
userId: message.senderId)),
882882
child: Text(message.senderFullName, // TODO get from user data
883-
style: const TextStyle(fontWeight: FontWeight.bold))),
883+
style: const TextStyle(
884+
fontFamily: 'Source Sans 3',
885+
fontSize: 18,
886+
height: (22 / 18),
887+
).merge(weightVariableTextStyle(context, wght: 600,
888+
wghtIfPlatformRequestsBold: 900)))),
884889
const SizedBox(height: 4),
885890
],
886891
MessageContent(message: message, content: item.content),
@@ -891,19 +896,22 @@ class MessageWithPossibleSender extends StatelessWidget {
891896
width: 80,
892897
padding: const EdgeInsets.only(top: 4, right: 16 - 8),
893898
alignment: Alignment.topRight,
894-
child: Text(time, style: _kMessageTimestampStyle)),
899+
child: Text(time,
900+
style: TextStyle(
901+
color: _kMessageTimestampColor,
902+
fontFamily: 'Source Sans 3',
903+
fontSize: 16,
904+
height: (18 / 16),
905+
fontFeatures: const [FontFeature.enable('c2sc'), FontFeature.enable('smcp')],
906+
).merge(weightVariableTextStyle(context)))),
895907
])));
896908
}
897909
}
898910

899911
// TODO web seems to ignore locale in formatting time, but we could do better
900912
final _kMessageTimestampFormat = DateFormat('h:mm aa', 'en_US');
901913

902-
// TODO this seems to come out lighter than on web
903-
final _kMessageTimestampStyle = TextStyle(
904-
fontSize: 12,
905-
fontWeight: FontWeight.w400,
906-
color: const HSLColor.fromAHSL(0.4, 0, 0, 0.2).toColor());
914+
final _kMessageTimestampColor = const HSLColor.fromAHSL(1, 0, 0, 0.5).toColor();
907915

908916
Future<void> markNarrowAsRead(BuildContext context, Narrow narrow) async {
909917
final store = PerAccountStoreWidget.of(context);

0 commit comments

Comments
 (0)