-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add visual density for menu default style #114878
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
Add visual density for menu default style #114878
Conversation
9d61cbd to
fa0dfc9
Compare
d7beb47 to
054b5fa
Compare
gspencergoog
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.
@QuncCccccc I'm so sorry, this fell through the cracks in my review queue!
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.
| // the density is less than zero, such as on the desktop platform. | |
| // the density is less than zero, such as on desktop platforms. |
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.
No worries at all! Thanks for taking time to review. Will rebase master and merge it soon:)!
054b5fa to
5afcbdf
Compare
cdce008 to
5e22719
Compare
| Rect.fromLTRB(145.0, 0.0, 655.0, 40.0), | ||
| Rect.fromLTRB(257.0, 40.0, 467.0, 176.0), | ||
| Rect.fromLTRB(467.0, 80.0, 715.0, 256.0), | ||
| Rect.fromLTRB(161.0, 0.0, 639.0, 40.0), |
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.
Numbers are updated here because the visual density is compact(-2, -2) here.
| Rect.fromLTRB(145.0, 0.0, 655.0, 40.0), | ||
| Rect.fromLTRB(333.0, 40.0, 543.0, 176.0), | ||
| Rect.fromLTRB(85.0, 80.0, 333.0, 256.0), | ||
| Rect.fromLTRB(161.0, 0.0, 639.0, 40.0), |
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.
Same here.
This reverts commit 37be384.

Fixes: #114850
This PR is to fix the issue that the Menu doesn't respond to density changes when the visual density is less than zero. When the app is running on the desktop platform, the menu should look denser based on its
VisualDensitywhich is -2. I set the minimum horizontal padding to 8 px to make sure the padding will never go to zero.VisualDensity: 0 (standard)

VisualDensity: -2 (compact)

Pre-launch Checklist
///).