Skip to content

Add a Window method to center the window #1822

@danielvschoor

Description

@danielvschoor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions