Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/package/contents/ui/MenuRepresentation.qml
Show First 20 Lines • Show All 390 Lines • ▼ Show 20 Line(s) | 388 | if (runnerModel.modelForRow(i).count) { | |||
---|---|---|---|---|---|
391 | targetList.forceActiveFocus(); | 391 | targetList.forceActiveFocus(); | ||
392 | break; | 392 | break; | ||
393 | } | 393 | } | ||
394 | } | 394 | } | ||
395 | } | 395 | } | ||
396 | } else if (event.key == Qt.Key_Down) { | 396 | } else if (event.key == Qt.Key_Down) { | ||
397 | if (rootList.visible) { | 397 | if (rootList.visible) { | ||
398 | rootList.showChildDialogs = false; | 398 | rootList.showChildDialogs = false; | ||
399 | rootList.currentIndex = 0; | 399 | rootList.currentIndex = Math.min(1, rootList.count); | ||
400 | rootList.forceActiveFocus(); | 400 | rootList.forceActiveFocus(); | ||
401 | rootList.showChildDialogs = true; | 401 | rootList.showChildDialogs = true; | ||
402 | } | 402 | } | ||
403 | 403 | | |||
404 | if (runnerColumns.visible) { | 404 | if (runnerColumns.visible) { | ||
405 | for (var i = 0; i < runnerModel.count; ++i) { | 405 | for (var i = 0; i < runnerModel.count; ++i) { | ||
406 | if (runnerModel.modelForRow(i).count) { | 406 | if (runnerModel.modelForRow(i).count) { | ||
407 | var targetList = runnerColumnsRepeater.itemAt(i); | 407 | var targetList = runnerColumnsRepeater.itemAt(i); | ||
408 | targetList.currentIndex = Math.min(1, targetList.count); | ||||
409 | targetList.forceActiveFocus(); | ||||
410 | break; | ||||
411 | } | ||||
412 | } | ||||
413 | } | ||||
414 | } else if (event.key == Qt.Key_Left && cursorPosition == 0) { | ||||
415 | for (var i = runnerModel.count; i >= 0; --i) { | ||||
416 | if (runnerModel.modelForRow(i).count) { | ||||
417 | var targetList = runnerColumnsRepeater.itemAt(i); | ||||
408 | targetList.currentIndex = 0; | 418 | targetList.currentIndex = 0; | ||
409 | targetList.forceActiveFocus(); | 419 | targetList.forceActiveFocus(); | ||
410 | break; | 420 | break; | ||
411 | } | 421 | } | ||
412 | } | 422 | } | ||
423 | } else if (event.key == Qt.Key_Right && cursorPosition == length) { | ||||
424 | for (var i = 1; i < runnerModel.count; ++i) { | ||||
425 | if (runnerModel.modelForRow(i).count) { | ||||
426 | var targetList = runnerColumnsRepeater.itemAt(i); | ||||
427 | targetList.currentIndex = 0; | ||||
428 | targetList.forceActiveFocus(); | ||||
429 | break; | ||||
430 | } | ||||
413 | } | 431 | } | ||
414 | } else if (event.key == Qt.Key_Enter || event.key == Qt.Key_Return) { | 432 | } else if (event.key == Qt.Key_Enter || event.key == Qt.Key_Return) { | ||
415 | if (runnerColumns.visible && runnerModel.modelForRow(0).count) { | 433 | if (runnerColumns.visible && runnerModel.modelForRow(0).count) { | ||
416 | runnerModel.modelForRow(0).trigger(0, "", null); | 434 | runnerModel.modelForRow(0).trigger(0, "", null); | ||
417 | plasmoid.expanded = false; | 435 | plasmoid.expanded = false; | ||
418 | } | 436 | } | ||
419 | } | 437 | } | ||
420 | } | 438 | } | ||
Show All 20 Lines |