-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add all system cursors (framework) #60931
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 all system cursors (framework) #60931
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Piinks
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.
All these docs are really great.
| /// | ||
| /// * Android: TYPE_WAIT | ||
| /// * Web: wait | ||
| /// |
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.
Is there no mac equivalent? Like the spinning beach ball? 😜
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.
I probably should doc this, but mac decides when to show the spinning beach ball by itself (when the application does not respond a blocked callback for a while), and does not expose a way to manually trigger it.
| /// * Web: crosshair | ||
| /// * Web: crosshairCursor |
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.
Are these equivalent? Or specific to certain browsers?
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.
Good catch, this is actually macOS.
| /// A cursor indicating moving something. | ||
| /// | ||
| /// Typically the shape of four-way arrow. May fall back to [allScroll]. |
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.
allScroll mentions falling back on move, and here it is vice versa. Is there a specific condition or precedence for one or the other?
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.
Yeah, I thought move should be ubiquitous so that allScroll might fall back to it, but it turns out no platforms have move but no allScroll at all. I'll remove this fallback.
Piinks
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!
Description
This PR adds support to a number of system cursors to the framework.
With PR, Flutter now supports all system cursors from the following platforms:
Breakage
This PR renames the following cursors:
verticalDoubleArrowis renamed toresizeUpDownhorizontalDoubleArrowis renamed toresizeLeftRightTechnically a breaking change, however since I've found no reference of these values in g3 or flutter/tests, and these values have not been cut into a dev build, it should cause no breakage.
These renames are decided for the following reasons:
Related Issues
Tests
I added the following tests:
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.