Skip to content

Commit 29672a0

Browse files
committed
recent_dm_conversations: Make rows white, like in Figma
I missed this in zulip#249 and made the rows transparent, oops. So they were taking on the scaffold background color, 0xfffafafa a.k.a. ThemeData.canvasColor. (If we were using Material 3, the scaffold background color would be 0xfffefbff a.k.a. ThemeData.colorScheme.background. Neither color is correct for what the Figma actually specifies for the surface underneath this screen's scrollable content. That's 0xfff6f6f6, and we'll start using it soon.) The ink effect on touch was being enabled by the scaffold's underlying Material. To preserve the ink effect, use a Material here instead of e.g. a ColoredBox. See the design in Figma: https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=341%3A12378&mode=dev
1 parent e7fe06c commit 29672a0

File tree

1 file changed

+47
-44
lines changed

1 file changed

+47
-44
lines changed

lib/widgets/recent_dm_conversations.dart

+47-44
Original file line numberDiff line numberDiff line change
@@ -108,49 +108,52 @@ class RecentDmConversationsItem extends StatelessWidget {
108108
child: Icon(ZulipIcons.group_dm, color: Colors.black.withOpacity(0.5))));
109109
}
110110

111-
return InkWell(
112-
onTap: () {
113-
Navigator.push(context,
114-
MessageListPage.buildRoute(context: context, narrow: narrow));
115-
},
116-
child: ConstrainedBox(constraints: const BoxConstraints(minHeight: 48),
117-
child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [
118-
Padding(padding: const EdgeInsetsDirectional.fromSTEB(12, 8, 0, 8),
119-
child: AvatarShape(size: 32, borderRadius: 3, child: avatar)),
120-
const SizedBox(width: 8),
121-
Expanded(child: Padding(
122-
padding: const EdgeInsets.symmetric(vertical: 4),
123-
child: Text(
124-
style: const TextStyle(
125-
fontFamily: 'Source Sans 3',
126-
fontSize: 17,
127-
height: (20 / 17),
128-
color: Color(0xFF222222),
129-
).merge(weightVariableTextStyle(context)),
130-
maxLines: 2,
131-
overflow: TextOverflow.ellipsis,
132-
title))),
133-
const SizedBox(width: 12),
134-
unreadCount > 0
135-
? Padding(
136-
padding: const EdgeInsetsDirectional.only(end: 16),
137-
child: DecoratedBox(
138-
decoration: BoxDecoration(
139-
borderRadius: BorderRadius.circular(3),
140-
color: const Color.fromRGBO(102, 102, 153, 0.15),
141-
),
142-
child: Padding(
143-
padding: const EdgeInsetsDirectional.fromSTEB(4, 0, 4, 1),
144-
child: Text(
145-
style: const TextStyle(
146-
fontFamily: 'Source Sans 3',
147-
fontSize: 16,
148-
height: (18 / 16),
149-
fontFeatures: [FontFeature.enable('smcp')], // small caps
150-
color: Color(0xFF222222),
151-
).merge(weightVariableTextStyle(context)),
152-
unreadCount.toString()))))
153-
: const SizedBox(),
154-
])));
111+
return Material(
112+
color: Colors.white,
113+
child: InkWell(
114+
onTap: () {
115+
Navigator.push(context,
116+
MessageListPage.buildRoute(context: context, narrow: narrow));
117+
},
118+
child: ConstrainedBox(constraints: const BoxConstraints(minHeight: 48),
119+
child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [
120+
Padding(padding: const EdgeInsetsDirectional.fromSTEB(12, 8, 0, 8),
121+
child: AvatarShape(size: 32, borderRadius: 3, child: avatar)),
122+
const SizedBox(width: 8),
123+
Expanded(child: Padding(
124+
padding: const EdgeInsets.symmetric(vertical: 4),
125+
child: Text(
126+
style: const TextStyle(
127+
fontFamily: 'Source Sans 3',
128+
fontSize: 17,
129+
height: (20 / 17),
130+
color: Color(0xFF222222),
131+
).merge(weightVariableTextStyle(context)),
132+
maxLines: 2,
133+
overflow: TextOverflow.ellipsis,
134+
title))),
135+
const SizedBox(width: 12),
136+
unreadCount > 0
137+
? Padding(
138+
padding: const EdgeInsetsDirectional.only(end: 16),
139+
child: DecoratedBox(
140+
decoration: BoxDecoration(
141+
borderRadius: BorderRadius.circular(3),
142+
color: const Color.fromRGBO(102, 102, 153, 0.15),
143+
),
144+
child: Padding(
145+
padding: const EdgeInsetsDirectional.fromSTEB(4, 0, 4, 1),
146+
child: Text(
147+
style: const TextStyle(
148+
fontFamily: 'Source Sans 3',
149+
fontSize: 16,
150+
height: (18 / 16),
151+
fontFeatures: [FontFeature.enable('smcp')], // small caps
152+
color: Color(0xFF222222),
153+
).merge(weightVariableTextStyle(context)),
154+
unreadCount.toString()))))
155+
: const SizedBox(),
156+
]))),
157+
);
155158
}
156159
}

0 commit comments

Comments
 (0)