Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/package/contents/ui/MenuRepresentation.qml
Show First 20 Lines • Show All 237 Lines • ▼ Show 20 Line(s) | 221 | delegate: RunnerResultsList { | |||
---|---|---|---|---|---|
238 | } | 238 | } | ||
239 | 239 | | |||
240 | function focusChanged() { | 240 | function focusChanged() { | ||
241 | if (!runnerMatches.focus && runnerMatches.currentIndex != -1) { | 241 | if (!runnerMatches.focus && runnerMatches.currentIndex != -1) { | ||
242 | runnerMatches.currentIndex = -1; | 242 | runnerMatches.currentIndex = -1; | ||
243 | } | 243 | } | ||
244 | } | 244 | } | ||
245 | 245 | | |||
246 | Keys.onPressed: { | 246 | Keys.onPressed: event => { | ||
247 | var target = null; | 247 | var target = null; | ||
248 | 248 | | |||
249 | if (event.key === Qt.Key_Right) { | 249 | if (event.key === Qt.Key_Right) { | ||
250 | var targets = new Array(); | 250 | var targets = new Array(); | ||
251 | 251 | | |||
252 | for (var i = index + 1; i < runnerModel.count; ++i) { | 252 | for (var i = index + 1; i < runnerModel.count; ++i) { | ||
253 | targets[targets.length] = i; | 253 | targets[targets.length] = i; | ||
254 | } | 254 | } | ||
▲ Show 20 Lines • Show All 114 Lines • ▼ Show 20 Line(s) | 357 | State { | |||
369 | 369 | | |||
370 | PropertyChanges { | 370 | PropertyChanges { | ||
371 | target: searchField | 371 | target: searchField | ||
372 | anchors.leftMargin: undefined | 372 | anchors.leftMargin: undefined | ||
373 | anchors.rightMargin: sideBar.width + mainRow.spacing + units.smallSpacing | 373 | anchors.rightMargin: sideBar.width + mainRow.spacing + units.smallSpacing | ||
374 | } | 374 | } | ||
375 | }] | 375 | }] | ||
376 | 376 | | |||
377 | Keys.onPressed: { | 377 | Keys.onPressed: event => { | ||
378 | if (event.key === Qt.Key_Up) { | 378 | if (event.key === Qt.Key_Up) { | ||
379 | if (rootList.visible) { | 379 | if (rootList.visible) { | ||
380 | rootList.showChildDialogs = false; | 380 | rootList.showChildDialogs = false; | ||
381 | rootList.currentIndex = rootList.model.count - 1; | 381 | rootList.currentIndex = rootList.model.count - 1; | ||
382 | rootList.forceActiveFocus(); | 382 | rootList.forceActiveFocus(); | ||
383 | rootList.showChildDialogs = true; | 383 | rootList.showChildDialogs = true; | ||
384 | } | 384 | } | ||
385 | 385 | | |||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | |||||
438 | } | 438 | } | ||
439 | 439 | | |||
440 | function appendText(newText) { | 440 | function appendText(newText) { | ||
441 | focus = true; | 441 | focus = true; | ||
442 | text = text + newText; | 442 | text = text + newText; | ||
443 | } | 443 | } | ||
444 | } | 444 | } | ||
445 | 445 | | |||
446 | Keys.onPressed: { | 446 | Keys.onPressed: event => { | ||
447 | if (event.key === Qt.Key_Escape) { | 447 | if (event.key === Qt.Key_Escape) { | ||
448 | plasmoid.expanded = false; | 448 | plasmoid.expanded = false; | ||
449 | } | 449 | } | ||
450 | } | 450 | } | ||
451 | 451 | | |||
452 | Component.onCompleted: { | 452 | Component.onCompleted: { | ||
453 | appendSearchText.connect(searchField.appendText); | 453 | appendSearchText.connect(searchField.appendText); | ||
454 | 454 | | |||
455 | kicker.reset.connect(reset); | 455 | kicker.reset.connect(reset); | ||
456 | windowSystem.hidden.connect(reset); | 456 | windowSystem.hidden.connect(reset); | ||
457 | } | 457 | } | ||
458 | } | 458 | } |