kurmikon updated this revision to Diff 82966.
kurmikon added a comment.

  Diff updated to a better version. So, I'm explaining what happens here.
  
  A RowLayout is placed where the old slider was. This contains a new slider 
and an additional spinbox.
  
  The spinbox gets float values by the user as reported by libinput 
documentation: [-1, 1]. Displayed value is converted in the internal integer 
value [-100, 100] with a stepsize of 1.
  
  The slider is basically the same as before, range [1, 11], only values 
multiple of 0,2 can be selected. An additional property AccelSpeedValue is set 
to convert the internal value to the format used by the spinbox.
  
  What happens when one control is modified. If the spinbox is modified, its 
new internal value is passed to //onAccelSpeedChanged// method of the 
RowLayout. Il the slider is modified, it's AccelSpeedValue is passed to 
//onAccelSpeedChanged// method of the RowLayout.
  
  What //onAccelSpeedChanged// does. It takes the arguments and compare it 
three times.
  
  1. with the slider accelSpeedValue; if it's different, the slider has been 
updated
  2. with the spinbox internal value; if it's different, the spinbox has been 
updated
  3. the argument divided by 100 with the libinput pointer acceleration; if 
it's different, the libinput property is updated and root.changeSignal() is 
invoked.
  
  Surely the method is called another time because of the update of the other 
control, but all checks will result false and nothing happens, avoiding loops, 
double writings and other issues.
  
  Compiled and tested on my system, it's working. Please, test on yours. Can't 
do better than that with my poor knowledge.

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D29365?vs=82323&id=82966

REVISION DETAIL
  https://phabricator.kde.org/D29365

AFFECTED FILES
  kcms/touchpad/kcm/libinput/touchpad.qml

To: kurmikon, #vdg, #plasma
Cc: ndavis, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart

Reply via email to