-
Notifications
You must be signed in to change notification settings - Fork 4
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
Move Window to next Monitor/Maximize/Almost Maximize #7
Comments
@thesobercoder I actually have a question. If the next monitor is not the same orientation how should sizing the window work and where should it be positioned? Currently I have it maintaining the same top and left position and will have it resize the window if it does not fit within the window. |
@shaqaruden Thanks so much for helping me out with this. To answer your question, it is actually a tricky one because we have to consider two things -
The way I think Rectangle does it, is by first calculating the size of the window (again in ratio of the destination monitor) and then place it in equal distance from both top/bottom and left/right. I think that should give us the desired effect. I'm open to other ideas. Let's keep chatting. |
So if I understand you correctly, lets say I place a window in the last fourth of a monitor then move it to another monitor it should maintain its relative position of the last fourth? |
I'm going to create the PR now with what I have but leave it in a WIP state |
Not really. The new size should dictate how the window will be positioned. Please remember that we are prescribing what, we think, is the best position on the next monitor. Like I said before, the position should always be center of the monitor based on the new size. This should work perfectly in most cases, I believe. |
I just wanted to reach out and say I almost have moving a window to the next monitor working. I have the window moving to the next monitor but need to fix the positioning and then write previous monitor.
I have also added Maximize and Almost Maximize.
I will submit a pull request when I am finished.
The text was updated successfully, but these errors were encountered: