mirror of
https://invent.kde.org/marcoa/a-la-karte.git
synced 2026-03-27 01:03:09 +00:00
fix: correct library hint labels and wire Y/Enter to direct launch
A/Space (confirm) opens the detail view, not launches → label was 'Play', now 'Details'. Y/Enter (details) was unhandled → wire onDetailsPressed + Keys.onReturnPressed/EnterPressed to launchFocused(), label was 'Details', now 'Play'. Matches SteamOS/Kodi pattern: primary button = info, secondary = launch.
This commit is contained in:
parent
44f87d6f14
commit
aa0b5ca799
2 changed files with 8 additions and 4 deletions
|
|
@ -110,8 +110,8 @@ FocusScope {
|
|||
}
|
||||
}
|
||||
|
||||
Keys.onReturnPressed: libraryRoot.selectFocused()
|
||||
Keys.onEnterPressed: libraryRoot.selectFocused()
|
||||
Keys.onReturnPressed: libraryRoot.launchFocused()
|
||||
Keys.onEnterPressed: libraryRoot.launchFocused()
|
||||
Keys.onSpacePressed: libraryRoot.selectFocused()
|
||||
|
||||
QQC2.BusyIndicator {
|
||||
|
|
@ -126,6 +126,10 @@ FocusScope {
|
|||
if (!grid.flickable || !grid.flickable.activeFocus) return
|
||||
libraryRoot.selectFocused()
|
||||
}
|
||||
function onDetailsPressed() {
|
||||
if (!grid.flickable || !grid.flickable.activeFocus) return
|
||||
libraryRoot.launchFocused()
|
||||
}
|
||||
function onNavigateUp() {
|
||||
if (!grid.flickable || !grid.flickable.activeFocus) return
|
||||
let cols = Math.max(1, Math.floor(grid.width / grid.cellWidth))
|
||||
|
|
|
|||
|
|
@ -178,9 +178,9 @@ RowLayout {
|
|||
if (root.context === "library") {
|
||||
switch (action) {
|
||||
case "navigate": return (useGamepadHints || keyboardLabel("navigate") !== "") ? i18n("Navigate") : ""
|
||||
case "confirm": return i18n("Play")
|
||||
case "confirm": return i18n("Details")
|
||||
case "back": return ""
|
||||
case "details": return i18n("Details")
|
||||
case "details": return i18n("Play")
|
||||
case "search": return i18n("Search")
|
||||
case "lb": return i18n("Prev Source")
|
||||
case "rb": return i18n("Next Source")
|
||||
|
|
|
|||
Loading…
Reference in a new issue