Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Edit MIDI Mapping Dialog Accessibility #23962

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ StyledDialogView {

signal mapToEventRequested(var event)

property NavigationPanel navigationPanel: NavigationPanel {
name: "EditMidiMappingDialog"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like there are extra spaces before "name"

section: root.navigationSection
order: 1
direction: NavigationPanel.Horizontal
}

function startEdit(action) {
model.load(action.mappedType, action.mappedValue)
actionNameLabel.text = action.title
Expand All @@ -46,6 +53,10 @@ StyledDialogView {
open()
}

onNavigationActivateRequested: {
mappingField.navigation.requestActive()
}


Rectangle {
anchors.fill: parent
Expand Down Expand Up @@ -105,6 +116,9 @@ StyledDialogView {

//: The app is waiting for the user to trigger a valid MIDI remote event
hint: qsTrc("shortcuts", "Waiting…")

navigation.panel: root.navigationPanel
navigation.order: 1
}
}

Expand All @@ -113,6 +127,8 @@ StyledDialogView {

buttons: [ ButtonBoxModel.Cancel ]

navigationPanel.section: root.navigationSection

FlatButton {
text: qsTrc("global", "Add")
buttonRole: ButtonBoxModel.ApplyRole
Expand All @@ -132,6 +148,13 @@ StyledDialogView {
}
}
}

Keys.onShortcutOverride: function(event) {
if(event.key === Qt.Key_Tab) {
focus = false
}
event.accepted = event.key !== Qt.Key_Tab
}
}
}
}