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

Creating a window with platform specific or explicit size #1229

Closed
dhardy opened this issue Oct 17, 2019 · 1 comment
Closed

Creating a window with platform specific or explicit size #1229

dhardy opened this issue Oct 17, 2019 · 1 comment
Labels
C - needs discussion Direction must be ironed out S - enhancement Wouldn't this be the coolest?

Comments

@dhardy
Copy link
Contributor

dhardy commented Oct 17, 2019

The current winit API gives two options for the size of a created window:

  • use a platform-specific default size (from the code, 800×600 on Linux & Mac, 1024×768 on Windows and web, screen size on mobile platforms)
  • specify the size and/or bounds (currently ignored on Android but apparently used on iOS)

What I want to do is:

  1. start with a default size (platform-specific or hard-coded 800×600 is fine)
  2. if (and only if) the following hold, adjust this default size
    • it is sensible to resize windows (i.e. not mobile platforms)
    • and the UI in question has soft bounds on size

I don't believe this is possible with the current UI — at least, not on iOS, where it would not normally make sense to reduce a window size simply because less space is needed.

Possibly related: #33

@goddessfreya goddessfreya added C - needs discussion Direction must be ironed out S - enhancement Wouldn't this be the coolest? labels Oct 18, 2019
@Osspial
Copy link
Contributor

Osspial commented Oct 27, 2019

Could you use #[cfg(target_os = "foo")] to conditionally specify window size?

@Osspial Osspial closed this as completed Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - needs discussion Direction must be ironed out S - enhancement Wouldn't this be the coolest?
Development

No branches or pull requests

3 participants