Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwindesktop/package/contents/ui/main.qml
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Line(s) | 191 | QtControls.CheckBox { | |||
---|---|---|---|---|---|
199 | 199 | | |||
200 | onCheckedChanged: kcm.navWraps = checked | 200 | onCheckedChanged: kcm.navWraps = checked | ||
201 | } | 201 | } | ||
202 | 202 | | |||
203 | RowLayout { | 203 | RowLayout { | ||
204 | Layout.fillWidth: true | 204 | Layout.fillWidth: true | ||
205 | 205 | | |||
206 | QtControls.CheckBox { | 206 | QtControls.CheckBox { | ||
207 | id: animationEnabled | ||||
208 | | ||||
209 | text: i18n("Show animation when switching:") | ||||
210 | | ||||
211 | checked: kcm.animationsModel.enabled | ||||
212 | | ||||
213 | onCheckedChanged: kcm.animationsModel.enabled = checked | ||||
214 | } | ||||
215 | | ||||
216 | QtControls.ComboBox { | ||||
217 | enabled: animationEnabled.checked | ||||
218 | | ||||
219 | model: kcm.animationsModel | ||||
220 | textRole: "NameRole" | ||||
221 | currentIndex: kcm.animationsModel.currentIndex | ||||
222 | onActivated: kcm.animationsModel.currentIndex = currentIndex | ||||
davidedmundson: Generally
onActivated
is better as that is only user changes.
onCurrentIndexChanges has… | |||||
223 | } | ||||
224 | | ||||
225 | QtControls.Button { | ||||
226 | enabled: animationEnabled.checked && kcm.animationsModel.currentConfigurable | ||||
227 | | ||||
228 | icon.name: "configure" | ||||
229 | | ||||
230 | onClicked: kcm.configureAnimation() | ||||
231 | } | ||||
232 | | ||||
233 | QtControls.Button { | ||||
234 | enabled: animationEnabled.checked | ||||
235 | | ||||
236 | icon.name: "dialog-information" | ||||
237 | | ||||
238 | onClicked: kcm.showAboutAnimation() | ||||
239 | } | ||||
240 | | ||||
241 | Item { | ||||
242 | Layout.fillWidth: true | ||||
243 | } | ||||
244 | } | ||||
245 | | ||||
246 | RowLayout { | ||||
247 | Layout.fillWidth: true | ||||
248 | | ||||
249 | QtControls.CheckBox { | ||||
207 | id: osdEnabled | 250 | id: osdEnabled | ||
208 | 251 | | |||
209 | text: i18n("Show on-screen display when switching:") | 252 | text: i18n("Show on-screen display when switching:") | ||
210 | 253 | | |||
211 | checked: kcm.osdEnabled | 254 | checked: kcm.osdEnabled | ||
212 | 255 | | |||
213 | onCheckedChanged: kcm.osdEnabled = checked | 256 | onCheckedChanged: kcm.osdEnabled = checked | ||
214 | } | 257 | } | ||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |
Generally
onActivated
is better as that is only user changes.
onCurrentIndexChanges has quirky issues if you ever make that model load asyncronously or whatever as it constantly rebounds.
Might not occur right now, but worth future proofing.