Skip to content

Support WindowResizability.contentSize properly #263

@stackotter

Description

@stackotter

At the moment, SwiftCrossUI takes WindowResizability.contentSize to mean that the window should have a fixed size equal to that of its content view. That's flawed because the size of the content view itself can be influenced by the view's default size. Also, it doesn't align with SwiftUI.

contentSize should instead constrain the window's dimensions to be greater than or equal to the content view's minimum size, and less than or equal to the content view's maximum size (unless full screened, in which case it should just center the content view in whatever size the window gets given). On mobile, apps are always fullscreen (other than newer iPadOS versions, which will require special consideration), so contentSize should just be treated the same as contentMinSize.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions