-
-
Notifications
You must be signed in to change notification settings - Fork 815
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
New zoom algo #1415
New zoom algo #1415
Conversation
- Replaced the custom easing curve with a QEasingCurve object, so that we can easily test different curves. - Use a different scheme to select the curve, based on the duration of the animation. The goal is to find a way make the zoom work properly with both mouse wheel and macbook trackpad, hopefully without having to rely on accumulating the events as we do now in StelApp.cpp. Still experimental.
Seems to look a bit closer to the original behavior.
Not needed anymore now that we don't smooth out the start of the easing curve of the zoom animation.
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files |
I tested on desktop linux only. @silas1037 are you found a bottleneck for new algorithm? |
I just revert code here and got different running results. old code: armv7 android could zoom in/out by finger Maybe different OS react differently to various code, but I am still interested in them to get a balance. |
Define "fail"? I built and ran Stellarium on my Raspberry 4 (regular current Raspberry OS, touchpad on a Logitech wireless keyboard) yesterday. Zoom with 2-finger shift works. Time drag with Ctrl+2-finger-drag works. Click (identify), double-click (center) work. What else? I cannot comment on Android, because we don't support it. |
Thanks. |
@silas1037 please check the current master - probably I found source of error |
@alex-w: you didn't merge the new-zoom-algo branch totally it seems. Maybe that is the source of the bug? |
The branch was merged :) The problem is coming when duration is zero, so, I've added workaround to avoid zero in duration value. |
Great. It works. |
This patchset fixes the trackpad issue on the macbook pro. The behavior is slightly different that before so would be good to test a bit more to see if it is acceptable in all situation.
The new algo doesn't ease in the zoom animation for small changes, and ease in and out large zoom changes. The previous algorithm systematically eases in when we zoom out and systematically eases out when we zoom in. The problem with easing in small zoom changes is that the behavior then depends a lot on the frequency of wheel events, hence the trackpad bug.
Issue #529
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: