Skip to content

msglist: Fix mark-as-read button icon color in dark mode #927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions lib/widgets/message_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -745,20 +745,21 @@ class _MarkAsReadWidgetState extends State<MarkAsReadWidget> {
// Restate [FilledButton]'s default, which inherits from
// [zulipTypography]…
Theme.of(context).textTheme.labelLarge!
// …then clobber some attributes to follow Figma:
.merge(TextStyle(
fontSize: 18,
letterSpacing: proportionalLetterSpacing(context,
kButtonTextLetterSpacingProportion, baseFontSize: 18),
height: (23 / 18))
.merge(weightVariableTextStyle(context, wght: 400))),
// …then clobber some attributes to follow Figma:
.merge(TextStyle(
fontSize: 18,
letterSpacing: proportionalLetterSpacing(context,
kButtonTextLetterSpacingProportion, baseFontSize: 18),
height: (23 / 18))
.merge(weightVariableTextStyle(context, wght: 400))),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(7)),
).copyWith(
// Give the buttons a constant color regardless of whether their
// state is disabled, pressed, etc. We handle those states
// separately, via MarkAsReadAnimation.
foregroundColor: WidgetStateColor.resolveWith((_) => Colors.white),
backgroundColor: WidgetStateColor.resolveWith((_) => messageListTheme.unreadMarker),
foregroundColor: const WidgetStatePropertyAll(Colors.white),
iconColor: const WidgetStatePropertyAll(Colors.white),
backgroundColor: WidgetStatePropertyAll(messageListTheme.unreadMarker),
),
onPressed: _loading ? null : () => _handlePress(context),
icon: const Icon(Icons.playlist_add_check),
Expand Down