Skip to content

[Gallery] Add padding to demo appBar #289

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 4 commits into from
Jan 28, 2020
Merged

[Gallery] Add padding to demo appBar #289

merged 4 commits into from
Jan 28, 2020

Conversation

guidezpl
Copy link
Member

@guidezpl guidezpl commented Jan 28, 2020

This adds a bit of padding after the actions for the last ripple to be visible

Closes material-components/material-components-flutter-gallery#208

Screen Shot 2020-01-28 at 3 28 12 PM

Screen Shot 2020-01-28 at 3 45 24 PM

@perclasson
Copy link
Contributor

perclasson commented Jan 28, 2020

I don't think this is the correct screenshot - seems to be the Banner demo instead of the AppBar? Misunderstood the ticket.

Also can you add a screenshot for how it looks like on mobile?

@@ -245,6 +247,7 @@ class _DemoPageState extends State<DemoPage> with TickerProviderStateMixin {
_state == _DemoState.fullscreen ? selectedIconColor : iconColor,
onPressed: () => _handleTap(_DemoState.fullscreen),
),
SizedBox(width: appBarPadding),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would only solve the problem for the buttons on the right, but the back button on the left would still have the problem.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hence the SizedBox on the left :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see what you mean

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the back button is already afforded enough space for the ripple to show

@guidezpl
Copy link
Member Author

I don't think this is the correct screenshot - seems to be the Banner demo instead of the AppBar?

Also can you add a screenshot for how it looks like on mobile?

This is the appBar for all demos, and sure!

@rami-a
Copy link
Contributor

rami-a commented Jan 28, 2020

@guidezpl the issue is more evident in light theme but look at the ink ripple in the following screenshots

Screen Shot 2020-01-28 at 9 51 02 AM

Screen Shot 2020-01-28 at 9 51 09 AM

Copy link
Contributor

@rami-a rami-a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one small change

@@ -179,15 +179,19 @@ class _DemoPageState extends State<DemoPage> with TickerProviderStateMixin {
final colorScheme = Theme.of(context).colorScheme;
final iconColor = colorScheme.onSurface;
final selectedIconColor = colorScheme.primary;
final appBarPadding = 20.0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only do this if it is desktop, otherwise it'll look strange on mobile

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App bar icon ripples are clipped along edge of demo screen on Desktop (1)
3 participants