-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
High resolution scrolling #6220
Conversation
🤖 Hey, I'm @LmmsBot from github.com/lmms/bot and I made downloads for this pull request, click me to make them magically appear! 🎩
Linux
macOSWindows
🤖{"platform_name_to_artifacts": {"Linux": [{"artifact": {"title": {"title": "(AppImage)", "platform_name": "Linux"}, "link": {"link": "https://15233-15778896-gh.circle-artifacts.com/0/lmms-1.3.0-alpha.1.152%2Bg08c175c48-linux-x86_64.AppImage"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/15233?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}], "macOS": [{"artifact": {"title": {"title": "", "platform_name": "macOS"}, "link": {"link": "https://15230-15778896-gh.circle-artifacts.com/0/lmms-1.3.0-alpha.1.152%2Bg08c175c48-mac10.14.dmg"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/15230?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}], "Windows": [{"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://15232-15778896-gh.circle-artifacts.com/0/lmms-1.3.0-alpha.1.152%2Bg08c175c48-mingw-win64.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/15232?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://15231-15778896-gh.circle-artifacts.com/0/lmms-1.3.0-alpha.1.152%2Bg08c175c48-mingw-win32.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/15231?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/8ml673xylsowdwx6/artifacts/build/lmms-1.3.0-alpha-msvc2017-win32.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/41854652"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/nqkphoh4tetklxa1/artifacts/build/lmms-1.3.0-alpha-msvc2017-win64.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/41854652"}]}, "commit_sha": "4b1778610832623ea4579db52a298887e9c5f537"} |
For some reason MinGW build failed, but I guess you already notice it. #3154 is annoying as hell when someone workflow had Song Editor at full screen. I am glad it gets fixed. |
I tried building it locally with the |
Trying to build it locally, on Ubuntu 20.04 using MinGW it throws those errors:
Clean master was compiled correctly, without issues. |
It's a long shot, but what if you change line 32 in
|
It fixes compilation |
Handle really sensitive scroll wheels (or touch pads) gracefully.
Problem
Most widgets only check if a scroll event is positive or negative, and scroll exactly one step. For mice like the MX master this may result in 7 steps per mouse wheel tick, because it has a wheel resolution of 2° (compared to standard 15°).
Solution
This PR implements a concise way to calculate scrolled steps, while keeping the remainder value, as suggested by the Qt docs. The remainder is discarded when the widget loses focus.
Widgets are updated to use this new counter logic. This means that editors, knobs and faders may be scrolled with a much finer precision using a hi-res mouse.
This also sets a new minimum scroll speed for knobs and faders (at most 200 steps form start to end). Scrolling really really fast on a standard mouse is also
fastermore accurate now.Excuses
I've tried to build the counter in a way that using it would require as little code as possible, and no need to remember increasing, decreasing or resetting it. In other words, make it so you can't get it wrong.
ScrollCounter
is cleaner than having anint
member in each widget and doing the same calculation in 20 places.ScrollCounter
is a singleton because there is only one scroll wheel, so why would each widget have its own instance of it?QWheelEvent
to the counter.As a side note, I've tried a way to intercept
QWheelEvent
and solve this problem higher up in the event chain. But this does not work due to how Qt does (undocumented) event propagation.Bugs fixed in this PR
Other questionable changes