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 "natural" scrolling support for trackpads #5510

Merged
merged 2 commits into from
May 21, 2024
Merged

Conversation

tresf
Copy link
Member

@tresf tresf commented May 21, 2020

Adds QWheelEvent::inverted() support to LcdSpinbox, Knob.

Closes #5507

If desired, may be a candidate for backport to 1.2.0 with a cherry-pick.

Edit: On second thought, let's let 1.2.x drift into the archives of time. master master race. :D

@tresf tresf added this to the 1.3 milestone May 21, 2020
@tresf tresf requested a review from PhysSong May 21, 2020 16:05
@LmmsBot
Copy link

LmmsBot commented May 21, 2020

🤖 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

Windows

macOS

🤖
{"platform_name_to_artifacts": {"Linux": [{"artifact": {"title": {"title": "(AppImage)", "platform_name": "Linux"}, "link": {"link": "https://6593-15778896-gh.circle-artifacts.com/0/lmms-1.2.1.681-linux-x86_64.AppImage"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/6593?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}], "Windows": [{"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://6594-15778896-gh.circle-artifacts.com/0/lmms-1.2.1.681-mingw-win32.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/6594?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://6592-15778896-gh.circle-artifacts.com/0/lmms-1.2.1.681-mingw-win64.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/6592?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/jjlwe73x61njxyw0/artifacts/build/lmms-1.2.1-msvc2017-win32.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/33032761"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/yw1ok0tr653x47b2/artifacts/build/lmms-1.2.1-msvc2017-win64.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/33032761"}], "macOS": [{"artifact": {"title": {"title": "", "platform_name": "macOS"}, "link": {"link": "https://6591-15778896-gh.circle-artifacts.com/0/lmms-1.2.1.681-mac10.13.dmg"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/6591?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}]}, "commit_sha": "0ced133065f1145e6d3bb7a6480fe2606158edb9"}

@zonkmachine
Copy link
Member

LGTM. This looks fine for 1.2.2

PhysSong
PhysSong previously approved these changes May 27, 2020
@PhysSong
Copy link
Member

FYI, you will find some more places if you git grep for delta().

@tresf
Copy link
Member Author

tresf commented May 27, 2020

FYI, you will find some more places if you git grep for delta().

Thanks. Can we work from an exhaustive list then? (PLEASE EDIT!)

File Needs Flip Done
src/gui/editors/AutomationEditor.cpp ✅(excluding horizontal scroll) 🚫 Not sure where 🤦
src/gui/editors/PianoRoll.cpp ✅(note panning)
src/gui/editors/SongEditor.cpp ✅(excluding horizontal scroll)
src/gui/widgets/ComboBox.cpp
vsrc/gui/widgets/Fader.cpp
src/gui/widgets/Knob.cpp
src/gui/widgets/LcdSpinBox.cpp
src/gui/widgets/TabWidget.cpp ✖️(no, but could use proper card-swipe support) 🚫 Works as-is, but too sensitive and no left/right scroll support
src/tracks/Pattern.cpp ✅(Velocity for beat/bassline editor) ✅ It's not in Pattern.cpp, but tackled in MidiClipView .

I'm not sure about where the delta() is used for some of the editors. If it's scrubbing/scroll bars, that's behaving properly, but I notices that note panning on Piano Roll needs it so I might be missing something.

@JohannesLorenz
Copy link
Contributor

@tresf Merging this already (I think you can merge in CLI and still keep the PR open) might reduce merge conflicts after reorg. It's also useful to have it working for the most important widgets, so maybe get this code to master?

@tresf
Copy link
Member Author

tresf commented Jan 13, 2021

@tresf Merging this already (I think you can merge in CLI and still keep the PR open) might reduce merge conflicts after reorg. It's also useful to have it working for the most important widgets, so maybe get this code to master?

The code will be trivial to rebase. @PhysSong's instincts were to do this one for most items and I don't hate that idea. I'll move it to a WIP PR because it will require work before its ready.

@tresf tresf marked this pull request as draft January 13, 2021 20:41
@tresf tresf marked this pull request as ready for review May 9, 2024 06:40
@tresf
Copy link
Member Author

tresf commented May 9, 2024

Table updated #5510 (comment). Ready for review.

Copy link
Contributor

@Rossmaxx Rossmaxx left a comment

Choose a reason for hiding this comment

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

The minimum qt version is now 5.9 so this check is obsolete now.

src/gui/clips/MidiClipView.cpp Outdated Show resolved Hide resolved
src/gui/editors/PianoRoll.cpp Outdated Show resolved Hide resolved
src/gui/widgets/ComboBox.cpp Outdated Show resolved Hide resolved
src/gui/widgets/Fader.cpp Outdated Show resolved Hide resolved
src/gui/widgets/FloatModelEditorBase.cpp Outdated Show resolved Hide resolved
src/gui/widgets/LcdSpinBox.cpp Outdated Show resolved Hide resolved
@tresf
Copy link
Member Author

tresf commented May 9, 2024

The minimum qt version is now 5.9 so this check is obsolete now.

Removed checks.

@tresf tresf merged commit 32fe3e5 into LMMS:master May 21, 2024
9 checks passed
@tresf tresf deleted the inverted branch May 21, 2024 15:32
Rossmaxx pushed a commit that referenced this pull request May 21, 2024
Adds QWheelEvent::inverted() support to spinboxes, knobs, sliders
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.

Natural scrolling is backwards for knobs, spinboxes
6 participants