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

Gui: Add easing to navigation animations #12205

Merged
merged 2 commits into from Mar 4, 2024
Merged

Conversation

Rexbas
Copy link
Contributor

@Rexbas Rexbas commented Jan 30, 2024

This adds an option (enabled by default) to use the InOutCubic easing function in navigation animations. By using this, the start and end of the animations are more smooth instead of directly going to the max speed or 0.

@github-actions github-actions bot added the Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD label Jan 30, 2024
@chennes
Copy link
Member

chennes commented Feb 12, 2024

Can you make this an enum class instead of a boolean, so that we can avoid "boolean blindness"?

@adrianinsaval
Copy link
Member

do we need this in the preference page? to me this is something that it's ok to have as just a parameter

@Rexbas
Copy link
Contributor Author

Rexbas commented Feb 12, 2024

Can you make this an enum class instead of a boolean

What about QEasingCurve::Type? This would also make it possible to change the easing curve to something else than Linear or InOutCubic.

do we need this in the preference page?

I don't know, I think it fits well where I have placed it.

@adrianinsaval
Copy link
Member

I don't know, I think it fits well where I have placed it.

it kind of fits but we already have too many preferences as it is, if we don't need to I prefer to not add more stuff. Are we expecting people to actually be changing this preference? Seems like a very obscure preference to me, not worth having a checkbox.

@Rexbas
Copy link
Contributor Author

Rexbas commented Feb 12, 2024

I think you are right, I will remove the checkbox.

@Rexbas
Copy link
Contributor Author

Rexbas commented Feb 13, 2024

I have removed the checkbox and changed the type to QEasingCurve::Type. The easing curve can be changed by modifying the parameter BaseApp/Preferences/View/NavigationAnimationEasingCurve. All possible values are described here

@chennes
Copy link
Member

chennes commented Feb 13, 2024

What about QEasingCurve::Type? This would also make it possible to change the easing curve to something else than Linear or InOutCubic.

Fine with me, it does support some future growth if someone ever gets it into their head to go nuts with the animations :).

@chennes chennes self-assigned this Feb 19, 2024
@chennes chennes merged commit 15b3b1d into FreeCAD:main Mar 4, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants