[vlc-commits] [Git][videolan/vlc][master] 3 commits: qml/PlaylistDelegate: improve layout

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Thu Dec 23 18:54:26 UTC 2021



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
ea02fa5f by Prince Gupta at 2021-12-23T18:09:37+00:00
qml/PlaylistDelegate: improve layout

fixes binding loop on implicit height

- - - - -
ba836cfa by Prince Gupta at 2021-12-23T18:09:37+00:00
qml/MainDisplay: improve playlist border placement

place it such that it won't interfere with "focus" rect of
PlaylistDelegate

- - - - -
9221f789 by Prince Gupta at 2021-12-23T18:09:37+00:00
qml/DragItem: allow updating indexes on requestData signal

fixes drag'ndrop in PlaylistView

- - - - -


3 changed files:

- modules/gui/qt/maininterface/qml/MainDisplay.qml
- modules/gui/qt/playlist/qml/PlaylistDelegate.qml
- modules/gui/qt/widgets/qml/DragItem.qml


Changes:

=====================================
modules/gui/qt/maininterface/qml/MainDisplay.qml
=====================================
@@ -320,11 +320,27 @@ FocusScope {
                             }
                         ]
 
+                        Rectangle {
+                            id: playlistLeftBorder
+
+                            anchors.top: parent.top
+                            anchors.bottom: parent.bottom
+                            anchors.left: parent.left
+
+                            width: VLCStyle.border
+                            color: VLCStyle.colors.border
+                        }
 
                         PL.PlaylistListView {
                             id: playlist
 
-                            anchors.fill: parent
+                            anchors {
+                                top: parent.top
+                                bottom: parent.bottom
+                                left: playlistLeftBorder.right
+                                right: parent.right
+                            }
+
                             focus: true
 
                             rightPadding: VLCStyle.applicationHorizontalMargin
@@ -343,17 +359,6 @@ FocusScope {
                                 stackView.forceActiveFocus()
                             }
 
-                            Rectangle {
-                                // id: playlistLeftBorder
-
-                                anchors.top: parent.top
-                                anchors.bottom: parent.bottom
-                                anchors.left: parent.left
-
-                                width: VLCStyle.border
-                                color: VLCStyle.colors.border
-                            }
-
                             Widgets.HorizontalResizeHandle {
                                 id: resizeHandle
 


=====================================
modules/gui/qt/playlist/qml/PlaylistDelegate.qml
=====================================
@@ -173,8 +173,8 @@ T.Control {
             id: textInfoColumn
 
             Layout.fillWidth: true
+            Layout.fillHeight: true
             Layout.leftMargin: VLCStyle.margin_large
-            Layout.preferredHeight: artworkItem.height * 1.25
             spacing: 0
 
             Widgets.ListLabel {
@@ -186,6 +186,7 @@ T.Control {
                 font.weight: model.isCurrent ? Font.Bold : Font.DemiBold
                 text: model.title
                 color: colors.text
+                verticalAlignment: Text.AlignTop
             }
 
             Widgets.ListSubtitleLabel {
@@ -197,6 +198,7 @@ T.Control {
                 font.weight: model.isCurrent ? Font.DemiBold : Font.Normal
                 text: (model.artist ? model.artist : I18n.qtr("Unknown Artist"))
                 color: colors.text
+                verticalAlignment: Text.AlignBottom
             }
         }
 


=====================================
modules/gui/qt/widgets/qml/DragItem.qml
=====================================
@@ -162,9 +162,6 @@ Item {
 
     on_ActiveChanged: {
         if (_active) {
-            if (_indexesSize < 1)
-                return
-
             dragItem._currentRequest += 1
             dragItem.requestData(dragItem._currentRequest)
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cdcb0614cd7ecec7460d34151c8dea41d5a0aa8a...9221f7899116aa062614a77916a05ffe8f7b76b7

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cdcb0614cd7ecec7460d34151c8dea41d5a0aa8a...9221f7899116aa062614a77916a05ffe8f7b76b7
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list