File Metadata

Author
mart
Created
Jun 11 2018, 12:32 PM

qqc2.diff

diff --git a/kcms/mouse/kcm/libinput/main.qml b/kcms/mouse/kcm/libinput/main.qml
index aba6723..82d5210 100644
--- a/kcms/mouse/kcm/libinput/main.qml
+++ b/kcms/mouse/kcm/libinput/main.qml
@@ -18,13 +18,11 @@
*/
import QtQuick 2.7
-import QtQuick.Controls 1.4 as Controls
+import QtQuick.Controls 2.3 as Controls
import QtQuick.Layouts 1.3 as Layouts
-import QtQuick.Controls.Styles 1.4 as Styles
import org.kde.kcm 1.1 as KCM
import org.kde.kirigami 2.4 as Kirigami
-import org.kde.plasma.core 2.0 as PlasmaCore
import "components"
@@ -103,6 +101,7 @@ Kirigami.ScrollablePage {
}
Kirigami.Separator {
+ Kirigami.FormData.isSection: true
}
// General
@@ -183,6 +182,7 @@ Kirigami.ScrollablePage {
}
Kirigami.Separator {
+ Kirigami.FormData.isSection: true
}
// Acceleration
@@ -190,14 +190,13 @@ Kirigami.ScrollablePage {
Kirigami.FormData.label: i18n("Pointer speed:")
id: accelSpeed
- tickmarksEnabled: true
+ //NOTE: for tickmarksEnabled Qt 5.11 is needed, tough QQC2-desktop-style will add ticks for any slider with a stepSize defined, so this is not needed
+ //tickmarksEnabled: true
- minimumValue: 1
- maximumValue: 10
+ from: 1
+ to: 10
stepSize: 1
- implicitWidth: units.gridUnit * 9
-
function load() {
enabled = device.supportsPointerAcceleration
if (!enabled) {
@@ -217,8 +216,11 @@ Kirigami.ScrollablePage {
}
}
- Controls.ExclusiveGroup {
+ Layouts.ColumnLayout {
id: accelProfile
+ spacing: Kirigami.Units.smallSpacing
+ Kirigami.FormData.label: i18n("Acceleration profile:")
+ Kirigami.FormData.buddyFor: accelProfileFlat
function load() {
enabled = device.supportsPointerAccelerationProfileAdaptive
@@ -238,37 +240,37 @@ Kirigami.ScrollablePage {
}
}
- onCurrentChanged: {
+ function syncCurrent() {
if (enabled && !root.loading) {
device.pointerAccelerationProfileFlat = accelProfileFlat.checked
device.pointerAccelerationProfileAdaptive = accelProfileAdaptive.checked
root.changeSignal()
}
}
- }
- Controls.RadioButton {
- id: accelProfileFlat
- Kirigami.FormData.label: i18n("Acceleration profile:")
- text: i18n("Flat")
- exclusiveGroup: accelProfile
+ Controls.RadioButton {
+ id: accelProfileFlat
+ text: i18n("Flat")
- ToolTip {
- text: i18n("Cursor moves the same distance as the mouse movement.")
+ ToolTip {
+ text: i18n("Cursor moves the same distance as the mouse movement.")
+ }
+ onCheckedChanged: accelProfile.syncCurrent()
}
- }
- Controls.RadioButton {
- id: accelProfileAdaptive
- text: i18n("Adaptive")
- exclusiveGroup: accelProfile
+ Controls.RadioButton {
+ id: accelProfileAdaptive
+ text: i18n("Adaptive")
- ToolTip {
- text: i18n("Cursor travel distance depends on the mouse movement speed.")
+ ToolTip {
+ text: i18n("Cursor travel distance depends on the mouse movement speed.")
+ }
+ onCheckedChanged: accelProfile.syncCurrent()
}
}
Kirigami.Separator {
+ Kirigami.FormData.isSection: true
}
// Scrolling