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

Add footprintAnimationDurationMultiplier default #1008

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

decodism
Copy link
Contributor

Add optional animations to the footprint window.

@rxhanson rxhanson merged commit 44c1a0d into rxhanson:master Nov 30, 2022
@rxhanson
Copy link
Owner

Nice! I like it.

@rxhanson
Copy link
Owner

I might add in a checkbox for this in Snap Areas tab, where checking the box would set it to something like 0.75 & unchecking would set it to 0.

@decodism decodism deleted the master-3 branch December 1, 2022 12:48
@decodism
Copy link
Contributor Author

decodism commented Dec 1, 2022

I agree. I understand you want to keep the settings minimalist but this one might be worth it.

@Aaron-Rumpler
Copy link
Contributor

Might be cleaner to scale the multiplier so that the default when enabling it can be 1, and that gets scaled to whatever you decide the default speed should be.

box?.makeKeyAndOrderFront(nil)
box?.setFrame(newBoxRect, display: true)
if Defaults.footprintAnimationDurationMultiplier.value > 0 {
if !box!.isVisible, let origin = getFootprintAnimationOrigin(snapArea, newBoxRect) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The animation's getting caught up here if the FootprintWindow hasn't closed yet (which only happens 0.3 seconds after the box.close() call), as it's still isVisible, even though it's completely transparent. So if you move a window away from a snapping area and straight back onto it within 0.3 seconds, the animation starts from where the window was when the window was moved away.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I have created a new PR.

@decodism decodism mentioned this pull request Dec 1, 2022
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

3 participants