[vlc-commits] qml: set the default focus on the content rather than the navigation bar

Pierre Lamot git at videolan.org
Thu Feb 20 13:56:44 CET 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri Feb 14 15:42:10 2020 +0100| [24321b883a1986a0eb7bd1de565ab5d43052f47c] | committer: Jean-Baptiste Kempf

qml: set the default focus on the content rather than the navigation bar

  This allows focus to be reset on the last item when navigating back rather
  that having it on the navigation bar and having to go down to get it on the
  item.

  This doesn't force the focus when navigating with history buttons or when
  changing tab.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=24321b883a1986a0eb7bd1de565ab5d43052f47c
---

 modules/gui/qt/medialibrary/qml/MainDisplay.qml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/medialibrary/qml/MainDisplay.qml b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
index c7903e6ec3..30800d64b5 100644
--- a/modules/gui/qt/medialibrary/qml/MainDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
@@ -142,7 +142,6 @@ Widgets.NavigableFocusScope {
                     Layout.maximumHeight: height
                     Layout.fillWidth: true
 
-                    focus: true
                     model: root.tabModel
 
                     onItemClicked: {
@@ -170,6 +169,9 @@ Widgets.NavigableFocusScope {
 
                     Widgets.StackViewExt {
                         id: stackView
+
+                        focus: true
+
                         anchors {
                             top: parent.top
                             left: parent.left



More information about the vlc-commits mailing list