Skip to content

The size of the native window picker is too small #2

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

Closed
EchoEllet opened this issue Jan 17, 2025 · 3 comments · Fixed by #7
Closed

The size of the native window picker is too small #2

EchoEllet opened this issue Jan 17, 2025 · 3 comments · Fixed by #7
Assignees
Labels
bug Something isn't working

Comments

@EchoEllet
Copy link
Contributor

EchoEllet commented Jan 17, 2025

The size of the native window picker is too small and needs window resizing by the user

Steps to reproduce:

  • Run the example on a supported macOS version.
  • Press the Pick Image or any button.
  • The native window will show up and it's smaller than expected.

Related lines.

Note

Unfortunately, I can't solve this issue as I'm unfamiliar with native macOS and Flutter macOS integration. This package was originally proposed as a PR to the Flutter ecosystem so I assumed someone else could fix this issue.

This is the most important issue on this repo because it prevents me from publishing the package to pub.dev (or as stable).

FlutterNativeMacOSImagePickerWindowSizeIssue.mov

Related Issues

@stuartmorgan-g
Copy link

Unfortunately, I can't solve this issue as I'm unfamiliar with native macOS and Flutter macOS integration.

Why do you believe this is related to Flutter integration? I see the same behavior in a trivial non-Flutter macOS app using the same code (i.e., without setting a frame on the PHPickerViewController's view).

EchoEllet added a commit that referenced this issue Jan 21, 2025
EchoEllet added a commit that referenced this issue Jan 21, 2025
@EchoEllet EchoEllet self-assigned this Jan 21, 2025
@EchoEllet
Copy link
Contributor Author

EchoEllet commented Jan 21, 2025

Thanks for your help!

Why do you believe this is related to Flutter integration?

I tried a similar API (PhotosPicker) in a macOS Swift app and it had a different default without ever setting the picker dimensions although it's not related.

Video for PhotosPicker in a macOS SwiftUI App

PhotosPickerMacOSSwiftUI.mov

without setting a frame on the PHPickerViewController's view

It looks like the fix is trivial and it's not even an issue (#7).

The initial and minimum sheet sizes are hardcoded but have similar values to the default behavior when displaying the picker using PhotosPicker in a macOS SwiftUI app.

EchoEllet added a commit that referenced this issue Jan 22, 2025
* fix: the sheet is smaller than expected #2, or might be displayed on the wrong window #4

* docs: remove known issue from README

* chore: set sheet min-content size

* chore: set fixed initial sheet size
@EchoEllet
Copy link
Contributor Author

Fixed in #7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants