Skip to content
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

Mouse Cursor #145

Closed
wants to merge 2 commits into from
Closed

Mouse Cursor #145

wants to merge 2 commits into from

Conversation

bdlukaa
Copy link
Contributor

@bdlukaa bdlukaa commented Jun 22, 2021

Add mouseCursor to MacosThemeData. By default, on Apple platforms, MouseCursor.defer (no cursor) is used. On the other platforms, SystemMouseCursors.click is used.

Closes #139

Pre-launch Checklist

  • I have run dartfmt on all changed files
  • I have incremented the package version as appropriate and updated CHANGELOG.md with my changes
  • I have added/updated relevant documentation
  • I have run "optimize/organize imports" on all changed files
  • I have addressed all analyzer warnings as best I could

@GroovinChip
Copy link
Collaborator

@wilsonowilson does this look good to you?

@wilsonowilson
Copy link
Contributor

Not sure how I feel about having cursor in the theme. Cursors don't have anything to do with theming, and as such, both ThemeData and CupertinoThemeData have no cursor property. Instead, cursors are provided to the widgets that need them alone.

But I understand the problem the PR is trying to solve... automatically providing a cursor to widgets that need it based on platform. I suggest creating a separate widget that handles this, perhaps an InheritedWidget called CursorConfiguration. That way we'd be able to call CursorConfiguration.of(context) to access things like clickableCursor? and disabledCursor. LMK what you think.

@GroovinChip
Copy link
Collaborator

Not sure how I feel about having cursor in the theme. Cursors don't have anything to do with theming, and as such, both ThemeData and CupertinoThemeData have no cursor property. Instead, cursors are provided to the widgets that need them alone.

But I understand the problem the PR is trying to solve... automatically providing a cursor to widgets that need it based on platform. I suggest creating a separate widget that handles this, perhaps an InheritedWidget called CursorConfiguration. That way we'd be able to call CursorConfiguration.of(context) to access things like clickableCursor? and disabledCursor. LMK what you think.

I agree with you, that seems like a better approach.

@bdlukaa bdlukaa closed this Aug 25, 2021
@GroovinChip GroovinChip deleted the mouse branch May 3, 2022 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Cursors use SystemMouseCursors.click instead of SystemMouseCursors.basic
3 participants