Skip to content

Conversation

@QuncCccccc
Copy link
Contributor

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 VisualDensity which is -2. I set the minimum horizontal padding to 8 px to make sure the padding will never go to zero.

VisualDensity: 0 (standard)
Screen Shot 2022-11-08 at 12 52 33 AM

VisualDensity: -2 (compact)
Screen Shot 2022-11-08 at 12 52 55 AM

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels Nov 8, 2022
@QuncCccccc QuncCccccc force-pushed the add_visualDensity_for_menu_default_style branch from 9d61cbd to fa0dfc9 Compare November 8, 2022 09:13
@QuncCccccc QuncCccccc marked this pull request as ready for review November 8, 2022 17:49
@QuncCccccc QuncCccccc force-pushed the add_visualDensity_for_menu_default_style branch from d7beb47 to 054b5fa Compare November 8, 2022 20:55
Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

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

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@QuncCccccc I'm so sorry, this fell through the cracks in my review queue!

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// the density is less than zero, such as on the desktop platform.
// the density is less than zero, such as on desktop platforms.

Copy link
Contributor Author

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:)!

@QuncCccccc QuncCccccc force-pushed the add_visualDensity_for_menu_default_style branch from 054b5fa to 5afcbdf Compare March 1, 2023 19:04
@QuncCccccc QuncCccccc force-pushed the add_visualDensity_for_menu_default_style branch from cdce008 to 5e22719 Compare March 1, 2023 21:21
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),
Copy link
Contributor Author

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),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here.

@QuncCccccc QuncCccccc added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 1, 2023
@auto-submit auto-submit bot merged commit 37be384 into flutter:master Mar 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 2, 2023
QuncCccccc added a commit that referenced this pull request Mar 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 2, 2023
QuncCccccc added a commit that referenced this pull request Mar 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 4, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App c: contributor-productivity Team-specific productivity, code health, technical debt. f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Menu Doesn't Respond to Density Changes

2 participants