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

Let user's specify a static window size #42

Open
matthew-carroll opened this issue Nov 8, 2023 · 1 comment
Open

Let user's specify a static window size #42

matthew-carroll opened this issue Nov 8, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@matthew-carroll
Copy link

By default, a window is resizable. I'd like to display a window at a set width, that the user isn't allowed to change. I'd like the height to respect a minimum and maximum height if the user tries to resize the window.

Please consider adding an API to specify imposed window constraints that prevent the user from making a window thinner/wider/taller/shorter than desired.

On a related note, I found that the only control I have over window sizing is to set the global rect, which requires knowledge of screen space. I'd prefer to just set the window size, and retain the existing location.

Similarly, the window delegate notifies us when the window will resize to a given Size, but if we want to then further resize the window, based on that new Size, we're forced to create a Rect in global screen space, so that we can use the Rect-based sizing method.

Please consider creating a symmetric API in which we can read and write sizes with Size, and we can read and write global positions with Rect. As of right now, we read Sizes and we write Rects, which is asymmetric.

Lastly, on a further related note, you might consider providing a method to change only the windows offset, without exposing the full Rect. Perhaps I want to move the (x,y) offset of the window, but I don't know the size, and I don't care about the size.

@Adrian-Samoticha Adrian-Samoticha added the enhancement New feature or request label Nov 8, 2023
@Adrian-Samoticha
Copy link
Member

Related: #11

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

No branches or pull requests

2 participants