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

Added support for corner sixth snap areas #799

Merged
merged 2 commits into from
Apr 27, 2022
Merged

Added support for corner sixth snap areas #799

merged 2 commits into from
Apr 27, 2022

Conversation

davystrong
Copy link
Contributor

Added support for snapping to corner sixths, as I like sixths for a wide screen but don't like keyboard shortcuts. I used similar logic to the two thirds snap areas, but starting from the corner and dragging inwards, to the thirds position, and the equivalent at the top.
I couldn't work out what topLeftShort, etc. meant and my logic works with and without the dock. Let me know if I need to add some logic to deal with "short" options.
I didn't add any region for centre sixths, as I can't think of any good gestures.
I also didn't add the logic for portrait mode. Would this be useful? I don't think I have any way to actually test this.

@rxhanson
Copy link
Owner

Thanks for contributing. This looks good, but at first cut it should all go behind a feature flag, configurable behind a terminal command. To do this, you can just create another entry in the Defaults class, and you might as well make it an OptionalBoolDefault which allows it to be easily enabled in the code in a future release if desired. Then in the code you would just check if the default is userEnabled. If this is confusing just let me know and I can clarify or just merge your pr and add it. I think this is a good improvement, but don't want to spring it on users suddenly.

topLeftShort and corresponding snap areas are the top half / bottom half areas on the left & right edges near the corners. If you drag the window up the left side of the screen then you'll see it change to top half before top left corner.

That's fine to go without portrait mode equivalents at this time, especially since it's initially rolled out via feature flag.

@davystrong
Copy link
Contributor Author

Hi @rxhanson, thanks for that explanation, I've added it as you suggested.

@rxhanson rxhanson merged commit 8a06c9d into rxhanson:master Apr 27, 2022
@rxhanson
Copy link
Owner

Thanks! I'm planning on rolling out a release pretty soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants