Comments (5)
@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.
from polygon.
@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 next monitor can be smaller than the current one (this can be tackled easily by always calculating the size in ratio of the monitor size)
- The next monitor can be, as you mentioned, in a different orientation.
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.
from polygon.
@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 next monitor can be smaller than the current one (this can be tackled easily by always calculating the size in ratio of the monitor size) * The next monitor can be, as you mentioned, in a different orientation.
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?
from polygon.
I'm going to create the PR now with what I have but leave it in a WIP state
from polygon.
@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 next monitor can be smaller than the current one (this can be tackled easily by always calculating the size in ratio of the monitor size) * The next monitor can be, as you mentioned, in a different orientation.
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?
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.
from polygon.
Related Issues (6)
- Feature Request: Implementation of First Fourth and Last Fourth HOT 3
- Feature Request: Support of Multiple Hotkeys for an Action HOT 1
- Visual Glitch: Information Overlay Is Not Updated When Multiple Actions Are Performed HOT 3
- Feature Request: .ini Option to Hide Information Overlay HOT 2
- Bug: Script Doesnโt Work When Window Is Maximized HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polygon.