Skip to content

feat: Option to disable touch scrolling #1385

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

puyral
Copy link

@puyral puyral commented Mar 11, 2025

This is a merge request closing #1246

This adds a small button to quickly activate/deactivate the touch scrolling on the canvas. For many situations, this is a very good workaround to inconsistent palm rejection.

Remaining to do:

  • the corresponding icon is black regardless of the theme. I couldn't figure out what takes care of the color of icons
  • activating inertial scrolling make mostly useless

Outside those two points, it has been working flawlessly on my (admittedly outdated) fork for the last 6 months.

@Doublonmousse
Copy link
Collaborator

For the first point, maybe check https://wiki.gnome.org/HowDoI(2f)CreateSymbolicIconsThatChangeColorAccordingToTheme.html (it's for gtk3 but I think it should suffice).

I think that's the absence of fill color that play a role in the theme working.
For example, there is a fill="#2e3436" in https://github.com/flxzt/rnote/blob/33fdab032faaf3bee41e9ed65e286f04988a00b0/crates/rnote-ui/data/icons/scalable/actions/add-page-symbolic.svg?short_path=1fc3354

I'm not sure I understand the second point. Can you explain in more detail ?

@puyral
Copy link
Author

puyral commented Mar 15, 2025

think that's the absence of fill color that play a role in the theme working.
For example, there is a fill="#2e3436" in https://github.com/flxzt/rnote/blob/33fdab032faaf3bee41e9ed65e286f04988a00b0/crates/rnote-ui/data/icons/scalable/actions/add-page-symbolic.svg?short_path=1fc3354

That was my understanding as well. But it didn't look good without the gray part. It seems to be possible to have some styling because some icons do it anyway... I'll look at the gnome documentation you linked because it seems to hold the answer I'm looking for.

I'm not sure I understand the second point. Can you explain in more detail ?

From what I understand, around here I'm "blocking" all events linked to drag motions. But apparently if it comes from the intertial/kinetic scrolling, it goes somewhere else (I'm not sure where). In practice this means that gtk still recognize the touch input and generate inertial scrolling for them which is then not ignored.
So with inertial scrolling activated, when the palm rejection fails it still move the canvas (even though you can't really move it "willingly").

@puyral puyral force-pushed the add-block-touch branch from 8532500 to c0a7f5f Compare April 6, 2025 18:56
@puyral puyral force-pushed the add-block-touch branch from c0a7f5f to 4e260c2 Compare April 6, 2025 19:12
@puyral puyral changed the title Draft: Option to disable touch scrolling feat: Option to disable touch scrolling Apr 6, 2025
@puyral
Copy link
Author

puyral commented Apr 6, 2025

A month later, I finally had time to work on this again ^^'

As far as I can tell, all the problems I listed above are fixed. I ended up changing the icon to another one straight from the gtk repository because I couldn't make it follow the theme...

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.

2 participants