[vlc-commits] qml: set the focus on the playlist from the player button

Pierre Lamot git at videolan.org
Sun Jul 28 08:44:00 CEST 2019


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri Jul 26 18:44:03 2019 +0200| [c340f9bd17eb927f51960a18917152b0ac2bc973] | committer: Jean-Baptiste Kempf

qml: set the focus on the playlist from the player button

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

 modules/gui/qt/qml/player/ControlButtons.qml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/qml/player/ControlButtons.qml b/modules/gui/qt/qml/player/ControlButtons.qml
index a69f9f7dcf..835ca01ccf 100644
--- a/modules/gui/qt/qml/player/ControlButtons.qml
+++ b/modules/gui/qt/qml/player/ControlButtons.qml
@@ -163,7 +163,12 @@ Item{
             objectName: "IconToolButton"
             size: VLCStyle.icon_medium
             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
         }
 



More information about the vlc-commits mailing list