[vlc-devel] [PATCH 2/4] qml: fix parent object name in Player.qml

Pierre Lamot pierre at videolabs.io
Tue Jul 30 10:53:40 CEST 2019


---
 modules/gui/qt/qml/player/Player.qml | 8 ++++----
 modules/gui/qt/qml/player/TopBar.qml | 7 ++++++-
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/modules/gui/qt/qml/player/Player.qml b/modules/gui/qt/qml/player/Player.qml
index 57258bb83d..7b72ee6c36 100644
--- a/modules/gui/qt/qml/player/Player.qml
+++ b/modules/gui/qt/qml/player/Player.qml
@@ -140,10 +140,10 @@ Utils.NavigableFocusScope {
             }
 
             onActionDown: controlBarView.forceActiveFocus()
-            onActionUp: root.actionUp(index)
-            onActionLeft: root.actionLeft(index)
-            onActionRight: root.actionRight(index)
-            onActionCancel: root.actionCancel(index)
+            onActionUp: rootPlayer.actionUp(index)
+            onActionLeft: rootPlayer.actionLeft(index)
+            onActionRight: rootPlayer.actionRight(index)
+            onActionCancel: rootPlayer.actionCancel(index)
 
             Keys.onPressed: {
                 if (event.key === Qt.Key_Menu) {
diff --git a/modules/gui/qt/qml/player/TopBar.qml b/modules/gui/qt/qml/player/TopBar.qml
index ddbfe40e6d..365993dae3 100644
--- a/modules/gui/qt/qml/player/TopBar.qml
+++ b/modules/gui/qt/qml/player/TopBar.qml
@@ -71,7 +71,12 @@ Utils.NavigableFocusScope{
                     objectName: PlayerControlBarModel.PLAYLIST_BUTTON
                     size: VLCStyle.icon_normal
                     text: VLCIcons.playlist
-                    onClicked: rootWindow.playlistVisible = !rootWindow.playlistVisible
+                    onClicked: {
+                        rootWindow.playlistVisible = !rootWindow.playlistVisible
+                        if (rootWindow.playlistVisible && rootWindow.playlistDocked) {
+                            playlistWidget.gainFocus(playlistBtn)
+                        }
+                    }
                     property bool acceptFocus: true
                 }
             }
-- 
2.17.1



More information about the vlc-devel mailing list