diff --git a/kcms/touchpad/src/kcm/libinput/main.qml b/kcms/touchpad/src/kcm/libinput/main.qml --- a/kcms/touchpad/src/kcm/libinput/main.qml +++ b/kcms/touchpad/src/kcm/libinput/main.qml @@ -230,23 +230,25 @@ id: accelSpeed from: 1 - to: 10 + to: 11 stepSize: 1 function load() { enabled = touchpad.supportsPointerAcceleration if (!enabled) { value = 0.1 return } - // transform libinput's pointer acceleration range [-1, 1] to slider range [1, 10] - value = 4.5 * touchpad.pointerAcceleration + 5.5 + // transform libinput's pointer acceleration range [-1, 1] to slider range [1, 11] + value = 6 + touchpad.pointerAcceleration / 0.2 } onValueChanged: { if (touchpad != undefined && enabled && !root.loading) { // transform slider range [1, 10] to libinput's pointer acceleration range [-1, 1] - touchpad.pointerAcceleration = Math.round( (value - 5.5) / 4.5 * 100 ) / 100 + // by *10 and /10, we ignore the floating points after 1 digit. This prevents from + // having a libinput value like 0.60000001 + touchpad.pointerAcceleration = Math.round(((value-6) * 0.2) * 10) / 10 root.changeSignal() } } @@ -476,7 +478,7 @@ Kirigami.Separator { } - + // Scrolling Layouts.ColumnLayout { Kirigami.FormData.label: i18n("Scrolling:")