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

Tracking issue: Sizing(&mut PhysicalSize) event #850

Closed
Osspial opened this issue Apr 24, 2019 · 7 comments
Closed

Tracking issue: Sizing(&mut PhysicalSize) event #850

Osspial opened this issue Apr 24, 2019 · 7 comments
Labels
D - average Likely as difficult as most tasks here DS - macos DS - wayland DS - windows DS - x11 P - normal Great to have S - api Design and usability S - meta Project governance

Comments

@Osspial
Copy link
Contributor

Osspial commented Apr 24, 2019

As discussed in #695 (comment). This will address #584 and allow window resize increments (useful for text editors).

Any PR that implements this should expose the client area's size, not the external window size.

@elinorbgr
Copy link
Contributor

Might be worth thinking if / how it should fit with the optional suggested size of the HiDPIFactorChanged event I suggested in #837 (comment) maybe?

@goddessfreya goddessfreya added D - average Likely as difficult as most tasks here P - normal Great to have S - api Design and usability labels Apr 25, 2019
@goddessfreya
Copy link
Contributor

@Osspial Is this still relevant?

@Osspial
Copy link
Contributor Author

Osspial commented Jun 20, 2019

@zegentzy Yeah, this was the original version of #949. I'd rather use this issue, since it's more specific about the sort of design we're looking for.

@LoganDark
Copy link
Contributor

LoganDark commented Jan 20, 2021

Any progress / news on this? It's been over a year, and this would be very useful. Right now you can only set a 'resize increment' once and only on specific platforms.

@madsmtm
Copy link
Member

madsmtm commented Sep 8, 2022

Since #2411 we now have Window::set_resize_increments, and it works with the client area's size.

While that doesn't fully address the original suggestion (having a callback on resize that the user can then respond to), I think it should solve the primary use-case? If not, feel free to reopen.

@madsmtm madsmtm closed this as completed Sep 8, 2022
@LoganDark
Copy link
Contributor

@madsmtm Does winit already fill the other use cases for a resize callback, such as aspect ratio constraints?

@madsmtm
Copy link
Member

madsmtm commented Sep 8, 2022

I don't think so, but perhaps that use-case (aspect ratio constraints) is more appropriately tracked in #584?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D - average Likely as difficult as most tasks here DS - macos DS - wayland DS - windows DS - x11 P - normal Great to have S - api Design and usability S - meta Project governance
Development

No branches or pull requests

5 participants