Skip to content
Snippets Groups Projects
Commit a749fb90 authored by Benjamin Arnaud's avatar Benjamin Arnaud Committed by Steve Lhomme
Browse files

qml/PlaybackSpeed(s): Fix keyboard navigation

parent 37a55445
No related branches found
No related tags found
1 merge request!2361qml: Add a dedicated Popup for the Teletext settings
......@@ -202,7 +202,7 @@ ColumnLayout {
focus: true
Navigation.parentItem: rowB
Navigation.parentItem: rowA
Navigation.downItem: slider
onClicked: slider.value = 0
......@@ -333,12 +333,10 @@ ColumnLayout {
bgColor: root.colors.button
borderColor: root.colors.buttonBorder
// NOTE: Applying the right theme to the ComboBox.
Navigation.parentItem: rowB
// NOTE: This makes the navigation convenient since 'up' is changing the comboBox value.
// NOTE: This makes the navigation possible since 'up' is changing the comboBox value.
Navigation.leftItem: slider
Navigation.rightItem: slider
Component.onCompleted: {
for (var i = 0; i < _model.length; i++) {
......
......@@ -38,6 +38,20 @@ Widgets.IconControlButton {
color: (popup.visible) ? colors.accent : colors.playerControlBarFg
// FIXME: We can't use upItem because a Popup is not an Item.
Navigation.upAction: function() {
if (popup.visible) {
popup.forceActiveFocus(Qt.TabFocusReason)
return
}
var parent = Navigation.parentItem;
if (parent)
parent.Navigation.defaultNavigationUp()
}
onClicked: popup.open()
Popup {
......@@ -115,6 +129,9 @@ Widgets.IconControlButton {
colors: root.colors
Navigation.parentItem: root
// NOTE: Mapping the right direction because the down action triggers the ComboBox.
Navigation.rightItem: root
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment