Skip to content

Commit

Permalink
ui: Use 0xfff6f6f6 for ColorScheme.background, following Figma
Browse files Browse the repository at this point in the history
From logging, this would otherwise be 0xfffefbff.

See the Flutter doc on ColorScheme.background:
  https://api.flutter.dev/flutter/material/ColorScheme/background.html

It simply says:
> A color that typically appears behind scrollable content.

This change is definitely the boldest we've been in perceiving a
pattern in the Figma spec and organizing our code to fit it. We
should cheerfully do something else if it turns out to make it
harder instead of easier to follow the spec.

Prompted by noticing that the surface underneath the scrollable
content in RecentDmConversationsPage wasn't colored according to the
Figma. And that the Figma's design for the Inbox page (zulip#117) had the
same color for the surface underneath *its* scrollable content. This
change fixes the RecentDmConversationsPage and makes it easy and
natural for the Inbox page to get the right color too.
  • Loading branch information
chrisbobbe committed Nov 15, 2023
1 parent 28759d2 commit 8863fda
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/widgets/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ class ZulipApp extends StatelessWidget {
// https://api.flutter.dev/flutter/material/ColorScheme/ColorScheme.fromSeed.html
// Or try this tool to see the whole palette:
// https://m3.material.io/theme-builder#/custom
colorScheme: ColorScheme.fromSeed(seedColor: kZulipBrandColor),
colorScheme: ColorScheme.fromSeed(
seedColor: kZulipBrandColor,

// Used in the Figma for surfaces underneath scrollable content, e.g.:
// <https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=341%3A12362&mode=dev>
background: const Color(0xfff6f6f6),
),
// `preferBelow: false` seems like a better default for mobile;
// the area below a long-press target seems more likely to be hidden by
// a finger or thumb than the area above.
Expand Down

0 comments on commit 8863fda

Please sign in to comment.