Changeset View
Changeset View
Standalone View
Standalone View
kcms/workspaceoptions/package/contents/ui/main.qml
Show All 12 Lines | |||||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | import QtQuick 2.7 | 18 | import QtQuick 2.7 | ||
19 | import QtQuick.Controls 1.4 as Controls | 19 | import QtQuick.Controls 1.4 as Controls | ||
20 | import QtQuick.Layouts 1.3 as Layouts | 20 | import QtQuick.Layouts 1.3 as Layouts | ||
21 | import QtQuick.Controls.Styles 1.4 as Styles | 21 | import org.kde.kirigami 2.4 as Kirigami | ||
22 | import org.kde.kcm 1.1 as KCM | 22 | import org.kde.kcm 1.1 as KCM | ||
23 | 23 | | |||
24 | import org.kde.plasma.core 2.0 as PlasmaCore | 24 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
25 | 25 | | |||
26 | Item { | 26 | KCM.SimpleKCM { | ||
27 | id: root | 27 | id: root | ||
28 | 28 | | |||
29 | Controls.ScrollView { | 29 | Kirigami.FormLayout { | ||
30 | anchors.fill: parent | 30 | id: formLayout | ||
31 | | ||||
32 | Layouts.ColumnLayout { | | |||
33 | id: maincol | | |||
34 | spacing: units.largeSpacing | | |||
35 | | ||||
36 | // General Settings | | |||
37 | Column { | | |||
38 | spacing: units.smallSpacing | | |||
39 | leftPadding: units.smallSpacing | | |||
40 | | ||||
41 | Controls.Label { | | |||
42 | text: i18n("General Settings") | | |||
43 | } | | |||
44 | 31 | | |||
32 | // Visaul behavior settings | ||||
45 | Controls.CheckBox { | 33 | Controls.CheckBox { | ||
46 | id: showToolTips | 34 | id: showToolTips | ||
35 | Kirigami.FormData.label: i18n("Visual behavior:") | ||||
47 | text: i18n("Display informational tooltips on mouse hover") | 36 | text: i18n("Display informational tooltips on mouse hover") | ||
48 | checked: kcm.toolTip | 37 | checked: kcm.toolTip | ||
49 | onCheckedChanged: kcm.toolTip = checked | 38 | onCheckedChanged: kcm.toolTip = checked | ||
50 | } | 39 | } | ||
ngraham: "Visual behavior settings" | |||||
51 | 40 | | |||
52 | Controls.CheckBox { | 41 | Controls.CheckBox { | ||
53 | id: showVisualFeedback | 42 | id: showVisualFeedback | ||
54 | text: i18n("Display visual feedback for status changes") | 43 | text: i18n("Display visual feedback for status changes") | ||
55 | checked: kcm.visualFeedback | 44 | checked: kcm.visualFeedback | ||
56 | onCheckedChanged: kcm.visualFeedback = checked | 45 | onCheckedChanged: kcm.visualFeedback = checked | ||
57 | } | 46 | } | ||
58 | 47 | | |||
59 | Connections { | 48 | Connections { | ||
60 | target: kcm | 49 | target: kcm | ||
61 | onToolTipChanged: showToolTips.checked = kcm.toolTip | 50 | onToolTipChanged: showToolTips.checked = kcm.toolTip | ||
62 | onVisualFeedbackChanged: showVisualFeedback.checked = kcm.visualFeedback | 51 | onVisualFeedbackChanged: showVisualFeedback.checked = kcm.visualFeedback | ||
63 | } | 52 | } | ||
64 | } | | |||
65 | 53 | | |||
66 | // ClickBehaviour Settings | 54 | Kirigami.Separator { | ||
67 | Column { | 55 | } | ||
68 | spacing: units.smallSpacing | | |||
69 | leftPadding: units.smallSpacing | | |||
70 | Controls.ExclusiveGroup { id: clickBehaviourGroup } | | |||
71 | 56 | | |||
72 | Controls.Label { | 57 | // Click behavior settings | ||
73 | text: i18n("Click Behaviour") | 58 | Controls.ExclusiveGroup { | ||
59 | id: clickBehaviorGroup | ||||
74 | } | 60 | } | ||
ngraham: "Click behavior settings" | |||||
75 | 61 | | |||
76 | Controls.RadioButton { | 62 | Controls.RadioButton { | ||
77 | id: singleClick | 63 | id: singleClick | ||
64 | Kirigami.FormData.label: i18n("Click behavior:") | ||||
78 | text: i18n("Single-click to open files and folders") | 65 | text: i18n("Single-click to open files and folders") | ||
79 | checked: kcm.singleClick | 66 | checked: kcm.singleClick | ||
80 | exclusiveGroup: clickBehaviourGroup | 67 | exclusiveGroup: clickBehaviorGroup | ||
81 | onCheckedChanged: kcm.singleClick = checked | 68 | onCheckedChanged: kcm.singleClick = checked | ||
82 | } | 69 | } | ||
83 | 70 | | |||
84 | Controls.RadioButton { | 71 | Controls.RadioButton { | ||
85 | id: doubleClick | 72 | id: doubleClick | ||
86 | text: i18n("Double-click to open files and folders (select icons on first click)") | 73 | text: i18n("Double-click to open files and folders (single click to select)") | ||
87 | exclusiveGroup: clickBehaviourGroup | 74 | exclusiveGroup: clickBehaviorGroup | ||
88 | } | 75 | } | ||
89 | 76 | | |||
90 | Connections { | 77 | Connections { | ||
91 | target: kcm | 78 | target: kcm | ||
92 | onSingleClickChanged: { | 79 | onSingleClickChanged: { | ||
93 | singleClick.checked = kcm.singleClick | 80 | singleClick.checked = kcm.singleClick | ||
94 | doubleClick.checked = !singleClick.checked | 81 | doubleClick.checked = !singleClick.checked | ||
95 | } | 82 | } | ||
96 | } | 83 | } | ||
97 | } | 84 | } | ||
98 | } // END Layouts.ColumnLayout | 85 | } | ||
99 | } // END Controls.ScrollView | | |||
100 | } // END Item | |
"Visual behavior settings"