[vlc-commits] [Git][videolan/vlc][master] qml: set activeFocusOnTab accordingly
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sun Dec 18 17:38:20 UTC 2022
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
8a69270b by Fatih Uzunoglu at 2022-12-18T17:17:48+00:00
qml: set activeFocusOnTab accordingly
- - - - -
4 changed files:
- modules/gui/qt/player/qml/ControlBar.qml
- modules/gui/qt/player/qml/ControlLayout.qml
- modules/gui/qt/widgets/qml/ExpandGridView.qml
- modules/gui/qt/widgets/qml/KeyNavigableListView.qml
Changes:
=====================================
modules/gui/qt/player/qml/ControlBar.qml
=====================================
@@ -188,6 +188,8 @@ Control {
Navigation.parentItem: root
Navigation.downItem: playerControlLayout
+ activeFocusOnTab: true
+
Keys.onPressed: {
Navigation.defaultKeyAction(event)
}
=====================================
modules/gui/qt/player/qml/ControlLayout.qml
=====================================
@@ -17,6 +17,7 @@
*****************************************************************************/
import QtQuick 2.11
import QtQuick.Controls 2.4
+import QtQuick.Templates 2.4 as T
import QtQuick.Layouts 1.11
import QtQml.Models 2.11
@@ -158,6 +159,9 @@ FocusScope {
// so it can be set here unlike leftItem and rightItem:
item.Navigation.parentItem = controlLayout
+ if (item instanceof Control || item instanceof T.Control)
+ item.activeFocusOnTab = true
+
// FIXME: Do we really need to enforce a defaultSize ?
if (item.size !== undefined)
item.size = Qt.binding(function() { return defaultSize; })
=====================================
modules/gui/qt/widgets/qml/ExpandGridView.qml
=====================================
@@ -121,6 +121,8 @@ FocusScope {
Accessible.role: Accessible.Table
+ activeFocusOnTab: true
+
// Events
Component.onCompleted: flickable.layout(true)
=====================================
modules/gui/qt/widgets/qml/KeyNavigableListView.qml
=====================================
@@ -73,6 +73,8 @@ FadingEdgeListView {
focus: true
+ activeFocusOnTab: true
+
//key navigation is reimplemented for item selection
keyNavigationEnabled: false
@@ -300,6 +302,8 @@ FadingEdgeListView {
visible: (root.orientation === ListView.Horizontal && !(root.atXBeginning))
onClicked: root.prevPage()
+
+ activeFocusOnTab: false
}
RoundButton {
@@ -313,5 +317,7 @@ FadingEdgeListView {
visible: (root.orientation === ListView.Horizontal && !(root.atXEnd))
onClicked: root.nextPage()
+
+ activeFocusOnTab: false
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8a69270b0abc50283e70d5cb8268e10b335ceae0
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8a69270b0abc50283e70d5cb8268e10b335ceae0
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list