Changeset View
Changeset View
Standalone View
Standalone View
kcms/workspaceoptions/package/contents/ui/main.qml
Show All 10 Lines | |||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. | ||
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 2.4 as Controls | ||
20 | import QtQuick.Layouts 1.3 as Layouts | 20 | import QtQuick.Layouts 1.3 as Layouts | ||
21 | import org.kde.kirigami 2.4 as Kirigami | 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 | KCM.SimpleKCM { | 26 | KCM.SimpleKCM { | ||
27 | id: root | 27 | id: root | ||
Show All 22 Lines | 48 | Connections { | |||
50 | onToolTipChanged: showToolTips.checked = kcm.toolTip | 50 | onToolTipChanged: showToolTips.checked = kcm.toolTip | ||
51 | onVisualFeedbackChanged: showVisualFeedback.checked = kcm.visualFeedback | 51 | onVisualFeedbackChanged: showVisualFeedback.checked = kcm.visualFeedback | ||
52 | } | 52 | } | ||
53 | 53 | | |||
54 | Kirigami.Separator { | 54 | Kirigami.Separator { | ||
55 | } | 55 | } | ||
56 | 56 | | |||
57 | // Click behavior settings | 57 | // Click behavior settings | ||
58 | Controls.ExclusiveGroup { | | |||
59 | id: clickBehaviorGroup | | |||
60 | } | | |||
61 | 58 | | |||
62 | Controls.RadioButton { | 59 | Controls.RadioButton { | ||
63 | id: singleClick | 60 | id: singleClick | ||
64 | Kirigami.FormData.label: i18n("Click behavior:") | 61 | Kirigami.FormData.label: i18n("Click behavior:") | ||
65 | text: i18n("Single-click to open files and folders") | 62 | text: i18n("Single-click to open files and folders") | ||
66 | checked: kcm.singleClick | 63 | checked: kcm.singleClick | ||
67 | exclusiveGroup: clickBehaviorGroup | | |||
68 | onCheckedChanged: kcm.singleClick = checked | 64 | onCheckedChanged: kcm.singleClick = checked | ||
69 | } | 65 | } | ||
70 | 66 | | |||
71 | Controls.RadioButton { | 67 | Controls.RadioButton { | ||
72 | id: doubleClick | 68 | id: doubleClick | ||
73 | text: i18n("Double-click to open files and folders (single click to select)") | 69 | text: i18n("Double-click to open files and folders (single click to select)") | ||
74 | exclusiveGroup: clickBehaviorGroup | | |||
75 | } | 70 | } | ||
76 | 71 | | |||
77 | Connections { | 72 | Connections { | ||
78 | target: kcm | 73 | target: kcm | ||
79 | onSingleClickChanged: { | 74 | onSingleClickChanged: { | ||
80 | singleClick.checked = kcm.singleClick | 75 | singleClick.checked = kcm.singleClick | ||
81 | doubleClick.checked = !singleClick.checked | 76 | doubleClick.checked = !singleClick.checked | ||
82 | } | 77 | } | ||
83 | } | 78 | } | ||
84 | } | 79 | } | ||
85 | } | 80 | } |