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

Add a Window method to center the window #1822

Closed
danielvschoor opened this issue May 13, 2021 · 1 comment
Closed

Add a Window method to center the window #1822

danielvschoor opened this issue May 13, 2021 · 1 comment

Comments

@danielvschoor
Copy link

Is your feature request related to a problem? Please describe.
My splash screen is not centered when my app launches. I’ve worked around it for now by hardcoding the position to the center of a 1920x1080 display. This will not be centered on 4K or other displays

Describe the solution you'd like
A method on the Window struct called ‘set_position_center()’ or ‘center()’ that centres the window based on the the actual screen size and the window size.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

I’m just creating this issue for tracking, I might even give this feature a go myself when I get some spare time

@nothingismagick
Copy link
Sponsor Member

Thanks @danielvschoor - technically this issue should probably be resolved at the https://github.com/tauri-apps/wry layer - but I will let @wusyong decide how he wants to handle that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants