Skip to content

Qt: Add click-and-drag scrolling to list and grid views#14193

Open
jasaaved wants to merge 2 commits intoPCSX2:masterfrom
jasaaved:UI-Improvements
Open

Qt: Add click-and-drag scrolling to list and grid views#14193
jasaaved wants to merge 2 commits intoPCSX2:masterfrom
jasaaved:UI-Improvements

Conversation

@jasaaved
Copy link
Copy Markdown

@jasaaved jasaaved commented Mar 23, 2026

Description of Changes

Adds click-and-drag scrolling to the game list table view and cover/grid view using Qt's QScroller with LeftMouseButtonGesture.

Rationale Behind Changes

Improves usability, especially on touch-enabled devices or for users who prefer click-and-drag scrolling over using the scrollbar or mouse wheel when navigating large game libraries.

Suggested Testing Steps

  • Open PCSX2 with a populated game library
  • In list view, click and drag to scroll through games and verify smooth scrolling
  • Switch to cover/grid view and repeat
  • Toggle button on the main window turns off click-and-drag scrolling
  • Switching between list and grid views keeps the toggle consistent

Did you use AI to help find, test, or implement this issue or feature?

Yes. I used AI to learn how Qt's QScroller API works.

User can now click and drag through the menus using the left mouse button or touch.
@Mrlinkwii Mrlinkwii added this to the Release 2.8 milestone Mar 26, 2026
Copy link
Copy Markdown
Contributor

@kamfretoz kamfretoz left a comment

Choose a reason for hiding this comment

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

Overall it worked well, but i would highly suggest having it be toggle-able instead of always on, because it makes things harder to be clicked if you move the mouse fast enough (or you are using high DPI mouse).

You can put the button next to the List/Grid view and the show title button.

Image

Demo:

2026-03-26.22-44-02.mp4

Added a button that turns click and drag scrolling next to the show titles button.
@jasaaved
Copy link
Copy Markdown
Author

jasaaved commented Mar 26, 2026

I have added the toggle. I got the icon from Remix Icon which I think the other icons are from there too which are free to use. If another icon is preferred, just let me know!
image

@Pesa
Copy link
Copy Markdown
Contributor

Pesa commented Apr 3, 2026

The left-click-and-drag UX is very odd and unusual IMHO. I can't think of another app that does that, at least on macOS (which is my primary OS).

@jasaaved
Copy link
Copy Markdown
Author

jasaaved commented Apr 3, 2026

The left-click-and-drag UX is very odd and unusual IMHO. I can't think of another app that does that, at least on macOS (which is my primary OS).

The toggle button? I honestly haven't seen one either. But I added it because of the request, but I didn't know a high DPI mouse could be an issue.

@Pesa
Copy link
Copy Markdown
Contributor

Pesa commented Apr 3, 2026

Not the toggle button. I'm referring to this entire feature.

Reacting to touch events (and scrolling the view) makes sense of course, but that seems to be already working out of the box (without QScroller). My objection is on the use of QScroller::LeftMouseButtonGesture. That is unusual.

@jasaaved
Copy link
Copy Markdown
Author

jasaaved commented Apr 3, 2026

Have you been able to test it with a touch device?

@jasaaved
Copy link
Copy Markdown
Author

jasaaved commented Apr 3, 2026

that seems to be already working out of the box

Unless I'm doing something wrong, I can only scroll using the scroll bar via touch. Putting aside Big Picture Mode.

@Pesa
Copy link
Copy Markdown
Contributor

Pesa commented Apr 3, 2026

Yes, scrolling via touchpad works fine on macOS (without this PR). I have a Linux laptop with a touch screen but I'm unable to test on it right now. What platform are you on?

In any case, even if QScroller is needed for touch screens, you should limit it to TouchGesture only IMHO, not LeftMouseButtonGesture. That was my point. (but again, just my 2 cents as a user)

@jasaaved
Copy link
Copy Markdown
Author

jasaaved commented Apr 3, 2026

Ah I see. Sometimes I play on a handheld device. A steam deck or a Legion Go 2. Touchpad controls aren't the same as touch screen controls. I can only scroll using the scroll bar via touch. Well, I probably can scroll other ways using different finger gestures, but I want 1 finger scrolling.

In theory, left mouse button gets converted to touch gesture anyways or vice versa. But I want this tested. The real goal for this PR, it will make touch scrolling feel like scrolling through your library on a steam deck via touch. I doubt anyone will actually use the mouse version but it's there if wanted.

@jasaaved
Copy link
Copy Markdown
Author

jasaaved commented Apr 6, 2026

In any case, even if QScroller is needed for touch screens, you should limit it to TouchGesture only IMHO, not LeftMouseButtonGesture.

I was able to clone my branch on my legion go 2. At least on Windows, LeftMouseButtonGesture works the same as TouchGesture. I can now scroll through my library with touch with just 1 finger. With the current live version, I can only scroll with using the scroll bar or using two fingers within the game list window with touch.

@Pesa
Copy link
Copy Markdown
Contributor

Pesa commented Apr 7, 2026

At least on Windows, LeftMouseButtonGesture works the same as TouchGesture.

So, can we use TouchGesture in the grabGesture() call? That would completely sidestep the issue mentioned by @kamfretoz and eliminate the need for that awkward toggle button.

@jasaaved
Copy link
Copy Markdown
Author

jasaaved commented Apr 7, 2026

can we use TouchGesture in the grabGesture()

I tested TouchGesture on a separate branch. It works just as well. The problem with TouchGesture is that it is OS dependent on what it does. On Windows it requires a touch screen. I think Linux also requires a touch screen too, but I'm not sure. MacOS should work fine with a trackpad, but I'm not sure about that either. I can push that change, but that would mean left mouse button click-and-drag scrolling will stop working and some may want that feature. LeftMouseButtonGesture should work on both mouse and touch on all OS because Qt internally maps touch events to mouse events by default, but I'll take suggestions on which is the best one to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants