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

Nicer handling of resizing with respect to screen boundaries #2

Open
jakereps opened this issue Aug 3, 2016 · 0 comments
Open

Nicer handling of resizing with respect to screen boundaries #2

jakereps opened this issue Aug 3, 2016 · 0 comments

Comments

@jakereps
Copy link
Owner

jakereps commented Aug 3, 2016

Currently the default behavior of expanding an Electron BrowserWindow is just to expand it outwards from the top left corner (i.e. in the positive x and y direction), but that doesn't play nicely when the screen is nested in any corner other than the top left corner, as growing in that direction pushes it off the screen.

This should be handled using the screen module of Electron. I think the way to do it would just be to force it to stay on the screen by also dynamically manipulating the x, y values on resize.

Another way could be to limit it to only be able to be placed in the corners and expand outwards from them, but that seems a little restrictive.

Bounds contraints:

_ _ _ _
|      ↑|
|      _|
|  ←  |_|
|_______|

Corner pinning:

 _ _ _ _              _ _ _ _
|_|  →   |    and    |  ←  |_|
|_↓______|           |_____↓_|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant