From 45f223cf00028434cf93374253768b5135aa7ec5 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Sat, 11 Nov 2023 15:13:24 +0000 Subject: [PATCH] msglist: Adjust MarkAsReadWidget style for text, size, and border radius Use Source Sans 3 for font family and bolder weight. Readjust containing padding due to tap target size of button being larger than visible height of button. --- lib/widgets/message_list.dart | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/widgets/message_list.dart b/lib/widgets/message_list.dart index 9248fb082a..b2d1dbf1c8 100644 --- a/lib/widgets/message_list.dart +++ b/lib/widgets/message_list.dart @@ -20,6 +20,7 @@ import 'page.dart'; import 'profile.dart'; import 'sticky_header.dart'; import 'store.dart'; +import 'text.dart'; class MessageListPage extends StatefulWidget { const MessageListPage({super.key, required this.narrow}); @@ -406,13 +407,18 @@ class MarkAsReadWidget extends StatelessWidget { // TODO(#368): this should pull from stream color color: Colors.transparent, child: Padding( - padding: const EdgeInsets.all(10), + // vertical padding adjusted for tap target height (48px) of button + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10 - ((48 - 38) / 2)), child: FilledButton.icon( style: FilledButton.styleFrom( backgroundColor: _UnreadMarker.color, - padding: const EdgeInsets.all(10), - textStyle: const TextStyle(fontSize: 18, fontWeight: FontWeight.w200), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)), + minimumSize: const Size.fromHeight(38), + textStyle: const TextStyle( + fontFamily: 'Source Sans 3', + fontSize: 18, + height: (23 / 18), + ).merge(weightVariableTextStyle(context)), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(7)), ), onPressed: () => _handlePress(context), icon: const Icon(Icons.playlist_add_check),