Changeset View
Changeset View
Standalone View
Standalone View
kcms/workspaceoptions/package/contents/ui/main.qml
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 66 | ColumnLayout { | |||
---|---|---|---|---|---|
68 | Kirigami.FormData.label: i18n("Animation speed:") | 68 | Kirigami.FormData.label: i18n("Animation speed:") | ||
69 | Kirigami.FormData.buddyFor: slider | 69 | Kirigami.FormData.buddyFor: slider | ||
70 | 70 | | |||
71 | QQC2.Slider { | 71 | QQC2.Slider { | ||
72 | id: slider | 72 | id: slider | ||
73 | Layout.fillWidth: true | 73 | Layout.fillWidth: true | ||
74 | from: -4 | 74 | from: -4 | ||
75 | to: 4 | 75 | to: 4 | ||
76 | stepSize: 1 | 76 | stepSize: 0.5 | ||
77 | snapMode: QQC2.Slider.SnapAlways | 77 | snapMode: QQC2.Slider.SnapAlways | ||
78 | onMoved: { | 78 | onMoved: { | ||
79 | if(value === to) { | 79 | if(value === to) { | ||
80 | kcm.globalsSettings.animationDurationFactor = 0; | 80 | kcm.globalsSettings.animationDurationFactor = 0; | ||
81 | } else { | 81 | } else { | ||
82 | kcm.globalsSettings.animationDurationFactor = 1.0 / Math.pow(2, value); | 82 | kcm.globalsSettings.animationDurationFactor = 1.0 / Math.pow(2, value); | ||
83 | } | 83 | } | ||
84 | } | 84 | } | ||
▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines |