Changeset View
Changeset View
Standalone View
Standalone View
kcms/workspaceoptions/package/contents/ui/main.qml
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | * Copyright 2018 Furkan Tokac <furkantokac34@gmail.com> | 2 | * Copyright 2018 Furkan Tokac <furkantokac34@gmail.com> | ||
3 | * Copyright (C) 2019 Nate Graham <nate@kde.org> | ||||
3 | * | 4 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | 8 | * (at your option) any later version. | ||
8 | * | 9 | * | ||
9 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 34 | Kirigami.FormLayout { | |||
100 | } | 101 | } | ||
101 | 102 | | |||
102 | Item { | 103 | Item { | ||
103 | Kirigami.FormData.isSection: false | 104 | Kirigami.FormData.isSection: false | ||
104 | } | 105 | } | ||
105 | 106 | | |||
106 | // Click behavior settings | 107 | // Click behavior settings | ||
107 | 108 | | |||
109 | QQC2.ButtonGroup { id: singleClickGroup } | ||||
110 | | ||||
108 | QQC2.RadioButton { | 111 | QQC2.RadioButton { | ||
109 | id: singleClick | 112 | id: singleClick | ||
110 | Kirigami.FormData.label: i18n("Click behavior:") | 113 | Kirigami.FormData.label: i18n("Click behavior:") | ||
111 | text: i18n("Single-click to open files and folders") | 114 | text: i18n("Single-click to open files and folders") | ||
115 | QQC2.ButtonGroup.group: singleClickGroup | ||||
112 | checked: kcm.singleClick | 116 | checked: kcm.singleClick | ||
113 | onCheckedChanged: kcm.singleClick = checked | 117 | onCheckedChanged: kcm.singleClick = checked | ||
114 | } | 118 | } | ||
115 | 119 | | |||
116 | QQC2.RadioButton { | 120 | QQC2.RadioButton { | ||
117 | id: doubleClick | 121 | id: doubleClick | ||
118 | text: i18n("Double-click to open files and folders (single click to select)") | 122 | text: i18n("Double-click to open files and folders (single click to select)") | ||
123 | QQC2.ButtonGroup.group: singleClickGroup | ||||
124 | } | ||||
125 | | ||||
126 | Item { | ||||
127 | Kirigami.FormData.isSection: false | ||||
128 | } | ||||
129 | | ||||
130 | // scroll handle settings | ||||
131 | | ||||
132 | QQC2.ButtonGroup { id: scrollHandleBehaviorGroup } | ||||
133 | | ||||
134 | QQC2.RadioButton { | ||||
135 | id: leftClickNavigatesByPage | ||||
136 | Kirigami.FormData.label: i18n("Clicking in scroll trough:") | ||||
ndavis: I feel like it's too easy to mistake the word trough for though or through. I think it would be… | |||||
ngraham: How about "Scrollbar track?" | |||||
That would work too. I said groove because that's the term that the Breeze QStyle uses in the code, but I don't think it matters too much whether we use groove or track as long as we do it consistently. I slightly prefer groove. ndavis: That would work too. I said groove because that's the term that the Breeze QStyle uses in the… | |||||
137 | text: i18nc("@radio completes the sentence 'Clicking in scroll trough scrolls one page up or down'", "Scrolls one page up or down") | ||||
138 | QQC2.ButtonGroup.group: scrollHandleBehaviorGroup | ||||
139 | checked: kcm.leftClickNavigatesByPage | ||||
140 | onCheckedChanged: kcm.leftClickNavigatesByPage = checked | ||||
141 | } | ||||
142 | | ||||
143 | QQC2.RadioButton { | ||||
144 | id: leftClickWarpsScrollHandle | ||||
145 | text: i18nc("@radio completes the sentence 'Clicking in scroll trough scrolls to the clicked location'", "Scrolls to the clicked location") | ||||
146 | QQC2.ButtonGroup.group: scrollHandleBehaviorGroup | ||||
119 | } | 147 | } | ||
120 | 148 | | |||
121 | Connections { | 149 | Connections { | ||
122 | target: kcm | 150 | target: kcm | ||
123 | onSingleClickChanged: { | 151 | onSingleClickChanged: { | ||
124 | singleClick.checked = kcm.singleClick | 152 | singleClick.checked = kcm.singleClick | ||
125 | doubleClick.checked = !singleClick.checked | 153 | doubleClick.checked = !singleClick.checked | ||
126 | } | 154 | } | ||
155 | onLeftClickNavigatesByPageChanged: { | ||||
156 | leftClickNavigatesByPage.checked = kcm.leftClickNavigatesByPage | ||||
157 | leftClickWarpsScrollHandle.checked = !leftClickNavigatesByPage.checked | ||||
158 | } | ||||
127 | } | 159 | } | ||
128 | } | 160 | } | ||
129 | } | 161 | } |
I feel like it's too easy to mistake the word trough for though or through. I think it would be better to use "scrollbar groove" instead of "scroll trough"