-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix multiple issues #177
Fix multiple issues #177
Conversation
Ready for review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! To make the review process more speedy and easier on reviewers and to have a cleaner commit history, I would really appreciate it if you would break this up into several smaller pull requests that only make one of these changes per PR
@danrabbit thanks for the fast response! I considered breaking this up into multiple PRs beforehand, but this would make it more complicated in my opinion. The problem is that all of this issues are interdependent. In the first place I just wanted to introduce the magnetic edges. But this functionality would be completely broken without fixing 2.. Unfortunately 2. can not be solved without solving 3. and 4.. Theoretically I could split the 1-4 up into two PRs, but this would require other code in the first PR to just not break things. And this code would then have to be removed in the second PR. If you want I could separate 5., but it just one line. |
- fix possible intersection of displays with different size - use display edges instead of intersection geometry to calculate offset - use same offset when starting recursion
Thanks for this Pull Request, this is highly appreciated. It looks like a huge improvement on the user experience! One thing that I think we don't really need is the show the x,y on the widget, monitors should be aligned because of the magnetic edge (if it's not doing this reliably it's probably a bug). Overall, this looks like a nice touch there! |
@tintou in my opinion the x,y-labels provide useful information. It gives the user the certainty that the monitors are properly aligned and also makes it easier to position monitors pixel-perfect if edge alignment is not wanted. I would also argue that especially multi-monitor users which tend to be more "heavy" users would like to have such information. I still removed the labels as it is a different issue. Back to this PR: To make the review easier, I added some commits to cleanup and concise the code. With the most recent commit this PR has only 50 LOC more than master. Also I wanted to ask - as completely rewrote the widget-snapping, gap-detection, intersection-detection and widget-alignment algorithms - if it is okay if I would add myself to the |
widget was not immediately redrawn/resized when resolution was changed
@danrabbit after the code cleanup and in contrary to what I initially said, it was with some small modifications possible to break this up into multiple PRs. I will therefore close this PR. |
Thanks @andreasfelix : ) |
This PR tries to address multiple issues:
I also added a label to show the current monitor geometry. Maybe this is too much, but I think it is useful to check if the monitors are properly aligned.
1./2. Magnetic edge and center:
Can be disabled by pressing Ctrl
3. Close gaps after mouse button release
Should work for all cases with 3 monitors. For 4 and the problem is more complicated.
4. Fix intersection for multiple displays: