Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/ConfigGeneral.qml
Show All 39 Lines | 29 | Kirigami.FormLayout { | |||
---|---|---|---|---|---|
40 | QQC2.SpinBox { | 40 | QQC2.SpinBox { | ||
41 | id: maximumVolume | 41 | id: maximumVolume | ||
42 | 42 | | |||
43 | Kirigami.FormData.label: i18n("Maximum volume:") | 43 | Kirigami.FormData.label: i18n("Maximum volume:") | ||
44 | 44 | | |||
45 | from: 10 | 45 | from: 10 | ||
46 | to: 150 | 46 | to: 150 | ||
47 | stepSize: 1 | 47 | stepSize: 1 | ||
48 | editable: true | ||||
48 | textFromValue: function(value) { | 49 | textFromValue: function(value) { | ||
49 | return value + "%"; | 50 | return value + "%"; | ||
50 | } | 51 | } | ||
52 | valueFromText: function(text) { | ||||
53 | return parseInt(text); | ||||
54 | } | ||||
51 | } | 55 | } | ||
52 | 56 | | |||
53 | QQC2.SpinBox { | 57 | QQC2.SpinBox { | ||
54 | id: volumeStep | 58 | id: volumeStep | ||
55 | implicitWidth: maximumVolume.width | 59 | implicitWidth: maximumVolume.width | ||
56 | 60 | | |||
57 | Kirigami.FormData.label: i18n("Volume step:") | 61 | Kirigami.FormData.label: i18n("Volume step:") | ||
58 | 62 | | |||
59 | from: 1 | 63 | from: 1 | ||
60 | to: 100 | 64 | to: 100 | ||
61 | stepSize: 1 | 65 | stepSize: 1 | ||
66 | editable: true | ||||
62 | textFromValue: function(value) { | 67 | textFromValue: function(value) { | ||
63 | return value + "%"; | 68 | return value + "%"; | ||
64 | } | 69 | } | ||
70 | valueFromText: function(text) { | ||||
71 | return parseInt(text); | ||||
72 | } | ||||
65 | } | 73 | } | ||
66 | 74 | | |||
67 | 75 | | |||
68 | Item { | 76 | Item { | ||
69 | Kirigami.FormData.isSection: true | 77 | Kirigami.FormData.isSection: true | ||
70 | } | 78 | } | ||
71 | 79 | | |||
72 | 80 | | |||
Show All 14 Lines |