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

Cannot use mousewheel without shift to scoll a horizontal-only scrollable. #2359

Closed
2 tasks done
Gremious opened this issue Apr 1, 2024 · 2 comments · Fixed by #2392
Closed
2 tasks done

Cannot use mousewheel without shift to scoll a horizontal-only scrollable. #2359

Gremious opened this issue Apr 1, 2024 · 2 comments · Fixed by #2392
Labels
bug Something isn't working

Comments

@Gremious
Copy link

Gremious commented Apr 1, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

I am working on an applicaiton where I have two splits, one scrolling horizontally and one vertically:

image

I can scroll the vertical one with the mousewheel just fine, but not the horizontal one. It demands I hold down shift, even though there's no vertical scrollbal present (the scrollable is Horizontal, not Both, so it can only scroll in the one direction anyway). I don't believe I am able to change this behaviour.

What is the expected behavior?

Shift should be needed only when both scrollbars are present. Otherwise, scrollwheel should just scroll.
Alternatively, I should be able to specify whether I want shift scrolling on a Horizontal scrollable.

Version

crates.io release

Operating System

Windows

Do you have any log output?

No response

@hecrj
Copy link
Member

hecrj commented Apr 18, 2024

What is the state of the art here? The Web does not implement this.

@Gremious
Copy link
Author

Gremious commented Apr 18, 2024

Yeah, horizontal scrolls are pretty rare, they don't show up in windows explorer anymore, terminals, most apps honestly. They're really not developed/looked at much.

The web does not implement this and that's been a problem for ages. Whenever you need to actually make a left/right moving menu, it creates a lot of friction, since web/app navigation is pretty much mouse only. Throwing in a shift key suddenly makes you stop moving when you expect to. Most people don't even know you can do that.

Hence why by now, everyone does little "scroll buttons" that jump x items left/right, and/or they manually implement swipe controls. You've probably seen them all round, the "display 3 elements and swipe/press the arrow on the side to keep scrolling through the next ones" is very common.

For my usecase, that really isn't good enough. I have a section of my app that is exclusively horizontally scrolled by design. I need to be fast and frictionless, and still usable without a hand on the keyboard.

I don't think most people use horizontal scrolls much, so I don't think this would impact people negatively (if at all). For the few that do, it would make the standard of mouse-only navigation a lot smoother. Though if the need arises, at worst we should be able to choose whether we want the shift modifier (I myself don't see why you ever would).

woelfman added a commit to woelfman/iced that referenced this issue May 14, 2024
The current implementation strictly scrolls vertically without the shift
modifier and horizontally with the shift modifier. This patch checks the
modifier only when the direction is Both.
@hecrj hecrj closed this as completed in 0a0ea30 Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants