[vlc-commits] qml: fix maindisplay keyboard navigation integration of the new playlist

Fatih Uzunoglu git at videolan.org
Fri Jul 24 11:45:55 CEST 2020


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Thu Jul  2 14:29:54 2020 +0300| [1064b374a6a06f15d7e54a19143b2d5d29edf28e] | committer: Pierre Lamot

qml: fix maindisplay keyboard navigation integration of the new playlist

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

 modules/gui/qt/medialibrary/qml/MainDisplay.qml | 146 ++++++++++++------------
 1 file changed, 75 insertions(+), 71 deletions(-)

diff --git a/modules/gui/qt/medialibrary/qml/MainDisplay.qml b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
index 7ba25412c0..3bb9f405e1 100644
--- a/modules/gui/qt/medialibrary/qml/MainDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
@@ -206,7 +206,7 @@ Widgets.NavigableFocusScope {
                         }
                     }
 
-                    ColumnLayout {
+                    Widgets.NavigableFocusScope {
                         id: playlistColumn
                         anchors {
                             top: parent.top
@@ -214,7 +214,6 @@ Widgets.NavigableFocusScope {
                             bottom: parent.bottom
                         }
                         width: root.width / 4
-                        spacing: 0
                         visible: false
 
                         property bool expanded: mainInterface.playlistDocked && mainInterface.playlistVisible
@@ -253,96 +252,101 @@ Widgets.NavigableFocusScope {
                             }
                         }
 
-                        Rectangle
-                        {
-                            id: topGlow
-                            Layout.fillWidth: true
-                            height: VLCStyle.margin_xxsmall
-                            visible: playlist.visible
-                            z: 1
-                            color: VLCStyle.colors.banner
-
-                            RectangularGlow {
-                                anchors.fill: parent
-                                glowRadius: VLCStyle.dp(8)
-                                color: VLCStyle.colors.glowColor
-                            }
+                        navigationParent: medialibId
+                        navigationLeftItem: stackView
+                        navigationUpItem: sourcesBanner
+                        navigationDownItem: miniPlayer.expanded ? miniPlayer : undefined
+                        navigationCancel: function() {
+                            mainInterface.playlistVisible = false
+                            stackView.forceActiveFocus()
                         }
 
-                        PL.PlaylistListView {
-                            id: playlist
-                            Layout.fillWidth: true
-                            Layout.fillHeight: true
-                            z: 0
-                            focus: true
-
-                            rightPadding: VLCStyle.applicationHorizontalMargin
-
-                            navigationParent: medialibId
-                            navigationLeftItem: stackView
-                            navigationUpItem: sourcesBanner
-                            navigationDownItem: miniPlayer.expanded ? miniPlayer : undefined
-                            navigationCancel: function() {
-                                mainInterface.playlistVisible = false
-                                stackView.forceActiveFocus()
-                            }
+                        ColumnLayout {
+                            anchors.fill: parent
+                            spacing: 0
 
-                            Item
+                            Rectangle
                             {
-                                anchors {
-                                    top: parent.top
-                                    left: parent.left
-                                    bottom: parent.bottom
-                                }
-                                width: VLCStyle.margin_xxsmall
+                                id: topGlow
+                                Layout.fillWidth: true
+                                height: VLCStyle.margin_xxsmall
+                                visible: playlist.visible
+                                z: 1
+                                color: VLCStyle.colors.banner
 
                                 RectangularGlow {
                                     anchors.fill: parent
-
                                     glowRadius: VLCStyle.dp(8)
                                     color: VLCStyle.colors.glowColor
                                 }
+                            }
+
+                            PL.PlaylistListView {
+                                id: playlist
+                                Layout.fillWidth: true
+                                Layout.fillHeight: true
+                                z: 0
+                                focus: true
+
+                                rightPadding: VLCStyle.applicationHorizontalMargin
 
-                                MouseArea {
-                                    id: dragArea
+                                Item
+                                {
                                     anchors {
                                         top: parent.top
+                                        left: parent.left
                                         bottom: parent.bottom
-                                        horizontalCenter: parent.horizontalCenter
                                     }
-                                    width: VLCStyle.dp(8)
-                                    property var _initialPos : playlistColumn.x
-                                    drag { target: parent; axis: Drag.XAxis }
-                                    onPositionChanged: {
-                                        if(drag.active){
-                                            var delta = mouseX - _initialPos
-                                            var newWidth = playlistColumn.width - delta
-
-                                            if (newWidth < root.width / 2 && newWidth > root.width / 8)
-                                                playlistColumn.width -= delta
-                                        }
+                                    width: VLCStyle.margin_xxsmall
+
+                                    RectangularGlow {
+                                        anchors.fill: parent
+
+                                        glowRadius: VLCStyle.dp(8)
+                                        color: VLCStyle.colors.glowColor
                                     }
-                                    onPressed: {
-                                        dragArea._initialPos = mouseX
+
+                                    MouseArea {
+                                        id: dragArea
+                                        anchors {
+                                            top: parent.top
+                                            bottom: parent.bottom
+                                            horizontalCenter: parent.horizontalCenter
+                                        }
+                                        width: VLCStyle.dp(8)
+                                        property var _initialPos : playlistColumn.x
+                                        drag { target: parent; axis: Drag.XAxis }
+                                        onPositionChanged: {
+                                            if(drag.active){
+                                                var delta = mouseX - _initialPos
+                                                var newWidth = playlistColumn.width - delta
+
+                                                if (newWidth < root.width / 2 && newWidth > root.width / 8)
+                                                    playlistColumn.width -= delta
+                                            }
+                                        }
+                                        onPressed: {
+                                            dragArea._initialPos = mouseX
+                                        }
+                                        cursorShape: Qt.SizeHorCursor
                                     }
-                                    cursorShape: Qt.SizeHorCursor
                                 }
                             }
-                        }
 
-                        Rectangle
-                        {
-                            id: bottomGlow
-                            Layout.fillWidth: true
-                            height: VLCStyle.margin_xxsmall
-                            visible: playlist.visible
-                            z: 1
-                            color: VLCStyle.colors.banner
+                            Rectangle
+                            {
+                                id: bottomGlow
+                                Layout.fillWidth: true
+                                height: VLCStyle.margin_xxsmall
+                                visible: playlist.visible
+                                z: 1
+                                color: VLCStyle.colors.banner
 
-                            RectangularGlow {
-                                anchors.fill: parent
-                                glowRadius: VLCStyle.dp(8)
-                                color: VLCStyle.colors.glowColor
+                                RectangularGlow {
+                                    anchors.fill: parent
+                                    glowRadius: VLCStyle.dp(8)
+                                    color: VLCStyle.colors.glowColor
+                                }
                             }
                         }
                     }



More information about the vlc-commits mailing list