KCM/mouse KCM/touchpad: Add a Scroll speed setting for wayland
ClosedPublic

Authored by meven on Mar 27 2020, 9:35 AM.

Details

Summary

Depends on D28310

FEATURE: 403843
FIXED-IN: 5.19.0

Test Plan

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
meven created this revision.Mar 27 2020, 9:35 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 27 2020, 9:35 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
meven requested review of this revision.Mar 27 2020, 9:35 AM
meven edited the test plan for this revision. (Show Details)Mar 27 2020, 9:35 AM
davidedmundson added inline comments.Mar 27 2020, 9:40 AM
kcms/touchpad/src/kcm/libinput/touchpad.qml
607

So I can only make it faster?

Is that sensible?

615

Don't use onValueChanged

use onMoved

then you don't need all of this other logic

meven added inline comments.Mar 27 2020, 10:10 AM
kcms/touchpad/src/kcm/libinput/touchpad.qml
607

We can make it slower with a number between 0 and 1.
I will need to implement a custom step that's all.
I am also hesitant of making the steps exponential, rather than linear.

zzag added a subscriber: zzag.Mar 27 2020, 10:41 AM
zzag added inline comments.
kcms/touchpad/src/kcm/libinput/touchpad.qml
607

I suspect that a scroll factor less than 1 may screw up discrete axis values. Not sure whether it might be a problem, though.

meven added inline comments.Mar 27 2020, 11:08 AM
kcms/touchpad/src/kcm/libinput/touchpad.qml
607

My testing went ok with a 0.1 scrollFactor, although not extensive (scroll in XWayland Firefox and in qtcreator Wayland mostly).

meven updated this revision to Diff 78629.Mar 27 2020, 11:14 AM

Use onMoved, allow to slow down the scroll speed, use presset values for the scroll speed slider

meven updated this revision to Diff 78635.Mar 27 2020, 11:49 AM

Add slower/faster tags to the slider, clean onMoved code

meven edited the test plan for this revision. (Show Details)Mar 27 2020, 11:50 AM

Old version:


New:

meven marked 5 inline comments as done.Mar 27 2020, 11:51 AM

So is this Wayland-only? The dependent patch says it's for Wayland.

meven retitled this revision from KCM/mouse KCM/touchpad: Add a Scroll speed setting to KCM/mouse KCM/touchpad: Add a Scroll speed setting for wayland.Mar 27 2020, 2:10 PM

So is this Wayland-only? The dependent patch says it's for Wayland.

Yes it is wayland-only, the two kcms here are Wayland specific.

These KCMs have X11 versions too. They are not Wayland-specific. I'm not a fan of adding this feature only on Wayland.

meven added a comment.Mar 27 2020, 2:20 PM

These KCMs have X11 versions too. They are not Wayland-specific. I'm not a fan of adding this feature only on Wayland.

By those KCM, I meant their frontend (they have each 1 for X and 1 for Wayland).

mouse kcm for X is in main_deviceless.qml
touchpad kcm for X is in touchpadconfigxlib.cpp

And this feature can only be implemented for Wayland.

meven updated this revision to Diff 78663.Mar 27 2020, 3:31 PM

Fix touchpad scrollFactor loading, rename 'Scroll speed' to 'Scrolling speed'

ervin added inline comments.Mar 27 2020, 5:52 PM
kcms/mouse/kcm/libinput/main.qml
333

nitpick: I'd put the closing square bracket on the next line and you can drop the semicolumn

343

You can drop the semicolumn in there

346

ditto

kcms/touchpad/src/kcm/libinput/touchpad.qml
631

Same comment applies than for mouse

638

ditto

644

ditto

meven updated this revision to Diff 78866.Mar 30 2020, 9:25 AM
meven marked 6 inline comments as done.

Remove unnecessary semilicons, formatting

ervin accepted this revision.Apr 7 2020, 3:59 PM

LGTM

This revision is now accepted and ready to land.Apr 7 2020, 3:59 PM
This revision was automatically updated to reflect the committed changes.