Skip to content

PopupMenu: add themeable mouse cursor#88590

Closed
jpnurmi wants to merge 1 commit intoflutter:masterfrom
jpnurmi:popup-menu-theme-mouse-cursor
Closed

PopupMenu: add themeable mouse cursor#88590
jpnurmi wants to merge 1 commit intoflutter:masterfrom
jpnurmi:popup-menu-theme-mouse-cursor

Conversation

@jpnurmi
Copy link
Member

@jpnurmi jpnurmi commented Aug 20, 2021

Allow themes to override PopupMenu's mouse cursor.

Partial fix to #88371

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 feature I am adding, or Hixie said the 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. labels Aug 20, 2021
@google-cla google-cla bot added the cla: yes label Aug 20, 2021
@jpnurmi jpnurmi force-pushed the popup-menu-theme-mouse-cursor branch from 1456a62 to f1951a9 Compare August 20, 2021 17:43
@HansMuller HansMuller self-requested a review August 20, 2021 18:03
@flutter-dashboard
Copy link

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

///
/// If this property is null, [MaterialStateMouseCursor.clickable] will be used.
/// If null, then the value of [PopupMenuThemeData.mouseCursor] is used. If
/// that is also null, then [MaterialStateMouseCursor.clickable] is used.
Copy link
Contributor

Choose a reason for hiding this comment

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

Even though it's implicitly mentioned above, it would be helpful to include a "see also" section that points at MaterialStateMouseCursor

if (!widget.enabled) MaterialState.disabled,
},
);
final Set<MaterialState> states = <MaterialState>{
Copy link
Contributor

Choose a reason for hiding this comment

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

InkWell already resolves the mouseCursor against focused/hovered/pressed/disabled and uses MaterialStateMouseCursor.clickable when mouseCursor is null. It looks like the right thing to do here is to just pass the mouse cursor along.

@HansMuller
Copy link
Contributor

I'm closing this PR in favor of #96567 which is an updated version of the same changes.

@HansMuller HansMuller closed this Jan 13, 2022
@jpnurmi jpnurmi deleted the popup-menu-theme-mouse-cursor branch January 14, 2022 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants