-
Notifications
You must be signed in to change notification settings - Fork 29.7k
AppBar draws its defaults from theme.colorScheme #69251
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
AppBar draws its defaults from theme.colorScheme #69251
Conversation
290bb1b to
bfeaa4c
Compare
darrenaustin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a question about using the brightness property in the color calculations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't these color calculations use the brightness property of the appBar itself if it has one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question. The existing AppBar/AppBarTheme brightness property is (and was) only used to set the SystemUiOverlayStyle. This is not correctly documented, I'll fix that.
In this case the brightness of theme's color scheme is used because we're choosing default colors that contrast with the theme's colors, which is also as things were.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to have a foreground color set here, or does it not matter here because we set the color in the icon and text themes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
e44b057 to
9d00682
Compare
|
This PR depends on a companion internal "SCUBA" test update: cl/341439577 |
This reverts commit a8f9d4c.
Added AppBar.foreground and AppBarTheme.foreground color and changed the way that AppBar computes its default colors and styles. Now:
Both AppBarTheme and AppBar now document how the theme's brightness relates to the SystemUiOverlayStyle per #67497.
Fixes #67921.