-
Notifications
You must be signed in to change notification settings - Fork 48
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
feat: Center Window Preview According to Current Dock Icon #326
Conversation
Calculate the window preview frame according to the hovered icon frame
Alright, so I've noticed an issue that occurs with multiple screens. When the main screen does not have the default screen resolution, the positioning of the preview will be calculated incorrectly on non-main screens. This is possibly related to #182 (comment) |
DockDoor/Views/Hover Window/SharedPreviewWindowCoordinator.swift
Outdated
Show resolved
Hide resolved
I can help, just ping me. |
- Use helper method from `DockObserver` (`cgPointFromNSPoint(_:forScreen:) to update from appropriate coordinate space - Update calculated y values to vertically center icon
I updated the code to use the helper methods in I tested by using my iPad and secondary MacBook to extend my screen using AirPlay, and from my testing the hover previews are in the correct locations per hovered icon, correct distances from screen bounds/dock, and correct screens. @ejbills if you can test these changes, I would appreciate it. |
@chrisharper22 this has been on the back-burner while I prioritized some other bugs. I will be taking a look at this this weekend! Apologies for the delay. |
@chrisharper22 - apologies for the delay once again, I have finally found some time to test this thoroughly and I fixed a small issue. Besides that, it appears to be working as expected. Thank you for your continued additions! |
Calculate the window preview frame according to the hovered icon frame, attempting to replace #182 and update to modern codebase.
Describe your changes
[SharedWindowPreviewCoordinator] - calculate x- and y-positions for the preview frame from the currently hovered Dock icon.
Related issue number(s) and link(s)
Checklist before requesting a review
Core Functionality Changes
If this PR modifies core functionality, please provide a brief description of the changes and their impact below:
N/A
I am leaving this as a draft currently, as I do not have a reliable way to test for multi-screen setups. If someone is able to test this, I would appreciate it.